All Questions
2,353
questions
0
votes
1
answer
111
views
how can i start a new rails 7 project with bootstrap5 and jquery support
I need to create a rails7.3.1 project with bootstrap latest.But, heard that Jquery will not support with latest bootstrap.
Also, I am planing to download the latest bootstrap files as part of my rails ...
1
vote
1
answer
531
views
Rails 7 importmap with bulma and jquery
I'm having trouble getting Rails 7 importmaps to play nicely with jquery and bulma.
config/importmap.rb:
pin "application", preload: true
pin "@hotwired/turbo-rails", to: "...
0
votes
0
answers
71
views
Create a form dynamically based on the elements of json data
In my rails app. I have a new.html.erb with the contents below
<div class="container align-items-center">
<br>
<br>
<div class="col-sm-9">
<...
0
votes
2
answers
61
views
rails 7 touchpunch not draggable on mobile app
I am struggling to get a jquery slider to be draggable in the mobile app.
I have added touchpunch to my Gemfile but I get the following error when loading the page:
couldn't find file 'jquery-ui/mouse'...
0
votes
3
answers
76
views
Error when deleting microposts. For some reason the GET method is requested for https
Please understand that I am not familiar with English.
I am creating a sample application with Rails.
For some reason the following error occurs when I press the delete button on a micropost.
error
...
0
votes
1
answer
45
views
How to clear terminal using short cut key in java script
This is GDS command to run on Travelport terminal through API. Every command provide a response and after type clear terminal would be cleaned but same I need using shortcut(ctr+any key)
Command.GDS =...
0
votes
1
answer
121
views
in Rails, How to manipulate a photo when try upload it?
I am looking for a gem so that the user can crop it when choosing a photo.
The user clicks on "upload photo" and then when he selects his photo, a form appears for him to crop the photo. ...
0
votes
0
answers
269
views
Why isn't my JQuery working in Ruby on Rails Application?
I have just started a new project and struggling to get my JQuery working. I created a new file: app/javascript/menu.js after reading that I shouldn't be including JS in /javascript/application.js
And ...
1
vote
1
answer
122
views
in Rails, How to make a query in javascript?
Given the id of an element I need to make a query in javascript, for example:
javascript:
var post_value = $(".post").val() # return a post ID;
var post = #{Post.find_by(id: post_value)....
0
votes
1
answer
93
views
In Rails, how do I query my database from JavaScript so I can save the value of the query?
I would like to make a query given the id of my book in javascript and not fetch all the books from the database, for example:
I usually do it like this:
In my book controller, I make a query the ...
0
votes
1
answer
136
views
Rails: grouped_collection_select with select2 search doesn't return associated options
I'm using Rails 6. I'm using a grouped_collection_select for the following associations:
class Client
has_many :matters
end
class Matter
belongs_to :client
end
My select code looks like the ...
3
votes
2
answers
1k
views
How to Limit characters in select2?
I'd like to limit number characters of string in select2 in ten (10) characters, for example:
"apple", is valid.. has 5 characters
"book", is valid.. has 4 characters
"...
1
vote
0
answers
52
views
ajax with dry technique for multiple modal
I am trying to make a ajax request to handle multiple modal without repeating the ajax code. Although modal is working fine just want to know, is there any way that i don't have to write jquery code ...
1
vote
1
answer
41
views
How to store input values in simple for form? Rails
I have this simple for form:
<%= simple_form_for @user do |f| %>
<%= f.input :username, label_html: { class: 'my_class' }, hint_html: { class: 'hint_class' } %>
<%= f.input :age %&...
0
votes
1
answer
60
views
js function getting all values in the fields
The following function is only getting first index amount, while I need all the fields of amount, and find amount type in those fields
$("#payment_info").on("change", ".price&...