Questions tagged [jquery-rails]
The jquery-rails tag has no usage guidance.
jquery-rails
27
questions
0
votes
1
answer
331
views
Sometimes link_to with delete method or data-confirm does not work
Rails link_to code: <%= link_to "<i class='fa fa-trash'></i>".html_safe, resource_path(id: id), method: :delete, data: { confirm: "Are you sure...?" }, class: "...
0
votes
0
answers
537
views
A single `remote: true` form tag will not generate requests as type: `js` in my rails app
Basically I can't get a form with remote: true to submit as an xhr request.
It's been a long time since I've worked with a html.erb and js.erb based front end so I'm probably doing something dumb here
...
0
votes
1
answer
181
views
Rails 5.0 and JQuery .dialog() Not Working
I'm upgrading a rails app from 4.2 to 5.0. The ruby version is 2.6.4
The app has a view that allows the user to click a link to run a scheduling script that assigns students into courses/classes. ...
2
votes
1
answer
303
views
Rails `link_to` with `method` parameter gives 404 when open in new tab
Using Ruby 2.5.1/Rails 5.2.4.1 I generated a new Rails app, and edited/created the following files:
# config/routes.rb
Rails.application.routes.draw do
root 'some#home'
post 'foo' => 'some#foo'...
0
votes
0
answers
151
views
Uncaught ReferenceError: Modal is not defined after updating to rails 3.2.22.5
I am upgrading rails 3.1.0 application to rails 3.2.22.5. We have used backbone-rails for front-end rendering.
Before upgrading, everything was working fine. But, after upgrading the rails version to ...
3
votes
1
answer
433
views
jQuery conflict on Rails
My application.js:
//= require rails-ujs
//= require jquery
//= require activestorage
//= require turbolinks
//= require bootstrap-sprockets
//= require flatpickr.min
//= require_tree .
My Gemfile:
...
0
votes
0
answers
326
views
How to fix jquery-ui rails autocomplete error(turbolinks:load) in rails
I'm working on autocomplete part in rails. I am using 'jquery-ui-rails' gem. while using $(document).ready it is working but it I use $( document ).on('turbolinks:load', function() {} it is not ...
1
vote
2
answers
500
views
JS and jQuery event listeners do not work upon page load
I am trying to add some simple event listeners to some buttons. I am running Rails 5.2.0 and using the jQuery rails gem. Per the documentation, I added the gem to my gemfile, bundle installed, and ...
0
votes
1
answer
570
views
jQuery hide onLoad not working
Rails 5.1 App, using jquery-rails (loading jQuery 1.12.4). I have a function included in the header of a page that was working. I fixed a missing JS file function error unrelated to this and now it ...
0
votes
1
answer
99
views
Rails - How can I modify the http params before the request is made?
I'm doing a car selling website and I applied some filters.
For UX I added the symbol € and some spaces automatically.
But now what I want is when the user presses the submit button, remove the ...
0
votes
0
answers
65
views
jQuery animate callback fires before the animation is complete
I want to make a progress bar on a rails app that I'm working on. I am using the Bootstrap 4 progress bar.
Here is the code that I am using to change the progress bar width with respect to ajax ...
0
votes
2
answers
34
views
How can we display different form partials through click in rails
I have a navbar rendering like a partial.
ex: dashboard/menu
In navbar i have a links like mentor, corporate.
When click on those links, it has render different form partials.
Ex:
_menu.html.erb
...
0
votes
1
answer
11
views
Jquery Params to access ruby (link_to)
I need to access this link <%= link_to "Home", root_path, class: "btn btn-primary" %> in jquery to disable it in my code.
The link is given in ruby gem due to which I am unable to add class or ...
1
vote
0
answers
16
views
jQuery Rails Nested Resources Bug?
I have a Rails app using a form with several nested resources in it. The weird quirk about it is I am using several single select inputs as one multiple select input (i.e. Using the same name across ...
6
votes
2
answers
5k
views
Is `require jquery_ujs` still needed in Rails 5.1?
I am installing jQuery in my 5.1.x Rails app via the jquery-rails gem.
In the gem setup, they recommend to add these lines to application.js by default:
//= require jquery
//= require jquery_ujs
...