Tagged Questions
0
votes
1answer
25 views
if statements in a respond_to js file
I have a page that has ajax tabs that loads different actions in my controller to render a partial with different content.
So the index action of my controller has two remote: true links at the top. ...
0
votes
1answer
38 views
Rails - js.erb file executes twice [closed]
Fairly new to Rails but not JS here. I am calling a controller action using AJAX from a form button, it all works no problem except that everything is happening twice! The js.erb file renders the view ...
0
votes
2answers
33 views
ui-dialog box closes but html code remains on page, results in box staying up when using the box more than once
I've got a page with a popup box used to replace tds with new tds. The box works fine the first time, but each subsequent time, the box continues to display after hitting submit. I noticed that the ...
0
votes
0answers
41 views
jQuery callback not firing after rails ajax request
Controller
def create
@post = Post.new(params[:post])
respond_to do |format|
if @post.save
format.js { render partial: 'post', layout: false, locals: {post: @post}}
end
end
View
...
0
votes
0answers
20 views
rails render partial after ajax get request
I use Jvectormap into my Rails 3 app.
When I click on it, I want to hide the map and visualize a partial with information about the selected country.
I handle the map click and I send a GET req to ...
0
votes
0answers
20 views
Index page of site
I'm asking this here just to see what methods I can use and how I can go about accomplishing this task:
Basically, I have a Item model in my app with about 350 instances stored in the database. Now ...
0
votes
0answers
13 views
is there a way in a rails app to implement an ajax form within a modal dialog, without submitting twice?
here's what i actually did until now:
1) I'm loading asynchronously some content into a modal dialog with ajax, this way:
<a role="button" class="btn" data-remote="/establishments/<%= ...
0
votes
0answers
36 views
Ajax request in rails 3.2 hitting controller twice
I have an ajax call for my signup, but this ends up hitting the controller twice. I tested this using the debugger, so I am sure it hits it twice. Why does it do this?
Code for the controller is ...
1
vote
1answer
41 views
How to pass a newly defined variable from js.erb to html.erb
I've got a controller method that passes either an integer variable or an array of integers variable. I have to look through in my .js.erb file to reassign tds with the appropriate integer. How do I ...
1
vote
0answers
19 views
rails Remotipart form with Firefox doesn't work
I have this form, which submits well on Safari and Chrome but not in Firefox :
<%= form_for @user, :remote=> true, :html => { :id => "upload_avatar" , :multipart => true} do |f| %>
...
0
votes
0answers
40 views
AJAX Button Not Working?
I'm currently trying to get an AJAX favorite button working with a Rails app. I'm using the Thumbs Up Gem to handle the favoriting. For some reason, in the console the error I'm getting is:
...
0
votes
1answer
17 views
Devise password recoverable module via ajax
I building a javascript frontend (ember) to a rails api, and I'm using devise for user authentication.
All works well, but the password reccovery is giving me a hard time. I looked at the ...
0
votes
1answer
41 views
Form not submitting after ajax partial render
I'm working on a site, that allows you to make wishes. I want the user to be able to create a wish from anywhere on the site, which is why I thought of going with an jquery/ajax approach.
I have a ...
0
votes
1answer
25 views
Creating AJAX link_to to build a has_many :through association in rails
I am trying to create the proper AJAX link to build an association between my "Style" model which has a self-referencing association. What is the proper way to create an association when using ajax?
...
0
votes
1answer
21 views
Use js.erb file to rename td instead of replace it?
I've got a page that toggles fields back and forth on button presses. So far, my only solution is to put a nested td inside the original one making the page look bad. You can see the tunnel effect ...