1
vote
1answer
9 views

Sending AJAX Post Jquery in rails application

With simple controller: def new @product = Product.new respond_to do |format| format.html #new.html.erb format.json { render json: @product} end end def create ...
0
votes
0answers
12 views

Form remote true: post request is sent, but view is not reloaded

I have a remote form in a view: <%= simple_nested_form_for(@item, :html => {multipart: true, class: 'form-horizontal'}, remote: true) do |f| %> ...
5
votes
2answers
245 views

How to trigger download with Rails send_data from AJAX post

I'm trying to use send_data to return a PNG image as the response for a ajax post request. How do I get the browser to trigger a download on the success callback? Details I'm generating a large ...
0
votes
1answer
31 views

Rails: What's going wrong in this Ajax call?

I receive from my server-side tracebacks: No route matches [POST] "/tracks/genlist" I made an action the handle an Ajax call. This is how I implemented it: Under routes.rb, I added the line get ...
0
votes
0answers
31 views

My page needs to be refreshed before database changes (adds/deletions) are shown?

I have a function called generatePlaylist() which looks like the following: function generatePlaylist(){ var list = <%= raw (Track.pluck(:video_id)).to_json %> player.loadPlaylist(list) ...
0
votes
1answer
42 views

Rails 3 each method and Ajax

I'm trying to implement some Ajax in my app. A strange behaviour occurs! It's a daycare application. When you show a specific daycare of a specific date you can add some children. Originally a list ...
1
vote
1answer
43 views

How can i Ajax this file upload in rails

I'm new to the topic of AJAX and I want to AJAX this file upload in rails. It's a nested file upload so be wary. When a photo is uploaded I just want it to show the photo and have a delete link. I ...
0
votes
0answers
19 views

Ajax call and looping through the returned data, uncaught exception

controller method that returns an array to the ajax call.. def get_files2 component_id = params[:id] dataset_id = cookies["datasetid"] @fofs = [] cmetas = MetaComponent.find(:all, ...
0
votes
1answer
64 views

Pass data via ajax using link_to to rails controller?

I would like to pass an object instance carrying data to the controller using ajax via link_to in a rails project. But my data does not seem to be getting carried to the controller, what have I done ...
1
vote
1answer
30 views

Why my Ajax call is being failed when I try to use JSONP?

I am working on a sample Rails app. I am trying to make a make a remote call to a json file like this : $.ajax({ dataType: "jsonp", url: ...
0
votes
2answers
37 views

how to use ajax response back in your view page?

I have this as my view page <html> <head> <script> function submit_form() { $('#my_form').submit(); } ...
0
votes
0answers
18 views

Do Ruby on Rails 3 Jquery AJAX POST requests need the authenticity_token?

According to the Rails security guide, if you use protect_from_forgery, all non-GET requests include an authenticity token. When I have Jquery AJAX POST requests, however, I don't see the ...
0
votes
2answers
36 views

Rails 3: update URL params with AJAX request

I have a filter and a list of products (id, name, creation_date). I can filter by id, name or creation_date. With an AJAX request I update a content div... but obviously the URL not change. How can ...
1
vote
1answer
39 views

rails ajax controller won't call javascript

I'm trying to create a new comment to a video show.html.erb in videos view <h5>New Comment</h5> <%= render 'comments/form' %> <div class = "show-comments"> ...
5
votes
3answers
494 views

Client side validations gem not working if I fetch form via ajax request

If I fetch a simple_form using ajax request, client side validations gem doesn't work.. <%= link_to 'Add +', new_group_path, :remote => true, :id => "new_group_link" %> Now the form new ...

1 2 3 4 5 62
15 30 50 per page