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

Gem doesn't work with rails-ujs #104

Open
psmir opened this issue Feb 11, 2019 · 3 comments
Open

Gem doesn't work with rails-ujs #104

psmir opened this issue Feb 11, 2019 · 3 comments

Comments

@psmir
Copy link

psmir commented Feb 11, 2019

When I use rails-ujs instead of jquery_ujs and try to remove nested fields by remove_nested_fields_link, I get the following error:
TypeError: $.rails.allowAction is not a function

@ncri
Copy link
Owner

ncri commented Mar 7, 2019

Check this issue here: #92 Possibly you can define $.rails.allowAction somewhere and make it return true as a hack. But haven't tried.

@sanjsharma
Copy link

Add gem 'jquery-rails' in your Gemfile.
In your application.js remove //= require rails-ujs and add //= require jquery_ujs. This worked for me in rails 5.2.2

@pomartel
Copy link

I defined $.rails.allowAction = function() { return true } and it fixed the issue when migrating to Rails UJS.

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

4 participants