Skip to content
This repository was archived by the owner on May 2, 2025. It is now read-only.
This repository was archived by the owner on May 2, 2025. It is now read-only.

Cumbersome javascript #1

Open
Open
@ari

Description

@ari

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 %>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions