Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cumbersome javascript #1

Open
ari opened this issue May 4, 2009 · 0 comments
Open

Cumbersome javascript #1

ari opened this issue May 4, 2009 · 0 comments

Comments

@ari
Copy link

ari commented May 4, 2009

I'd love to use this gem, but the problem is that the javascript which is recommended to be added to application.js or similar is very cumbersome.

$(document).ready(function() {
$("input#post_title").autocomplete("auto_complete_for_post_title")
});

This is very fragile since it relates to the specific choices made elsewhere ('post' and 'title' being changed later to 'post' and 'shortName' or something else). It also messes up one javascript file with 27 autocompletes used on 27 different pages on the site.

Is there some way for this gem to autogenerate the appropriate javascript and insert it onto each page? <%= autocomplete_js %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant