Skip to content

Tags fix #349

Closed
wants to merge 2 commits into from

3 participants

@dougbradbury

Fixes autocompletion of tags Issue #341
I realize that it won't work if you mount your engine somewhere other than /refinery/ because the route to the tags is hard coded in the javascript. I couldn't figure out how to get the refinery url helpers in the javascript.

@parndt
Refinery member
parndt commented Sep 15, 2013

To get the URL helpers rename the file to backend.js.erb, I believe.

@dougbradbury

I got that far, but didn't have access to the "refinery" help method that gives you the routes helper.

@ugisozols
Refinery member

You can get to Refinery's routes helpers like this:

Refinery::Core::Engine.routes.url_helpers.tags_blog_admin_posts_path
@dougbradbury

thanks. That did it.

@parndt
Refinery member
parndt commented Sep 15, 2013

Probably we don't need to pass dom_id or url to the autocomplete partial anymore

@parndt
Refinery member
parndt commented Sep 15, 2013

Here's what I had to do recently for rails4 support when poltergeist told me that this was broken: https://github.com/refinery/refinerycms-blog/blob/rails4/app/views/refinery/shared/admin/_autocomplete.html.erb && gone from https://github.com/refinery/refinerycms-blog/blob/rails4/app/assets/javascripts/refinery/blog/backend.js

But your approach keeps it all in the JS file which is nice.

@dougbradbury

no problems on 2.1.0-stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.