Tagged Questions
0
votes
1answer
35 views
Ajax with Polymorphic Association (Destroy)
I have a polymorphic association with dailyposts & comments in my rails app
Everything works fine in the database, but when I try to add Ajax to the Destroy Action (I used this tutorial ...
0
votes
1answer
8 views
In ruby on rails devise, will setting config.http_authenticatable_on_xhr = false results in cross-site request forgery?
This post gives a tutorial on how to sign in with ajax using devise and rails.
http://natashatherobot.com/devise-rails-sign-in/
One of the changes is to set config.http_authenticatable_on_xhr = false
...
0
votes
1answer
16 views
Rails 3.1 AJAX supported changes not reflected in browser
Running Rails 3.1 Ruby 1.92
I am trying to get my shopping cart to update using AJAX. I have the following button in my store front to create a line item
<%= button_to " Buy ", ...
2
votes
2answers
40 views
Rails: Form partial not clearing/reloading after AJAX submission
I am trying to create a one page/view application. I have a form I submit that creates a simple tweet object:
_form.html.erb
<div id="schedule-tweet-form">
<%= simple_form_for @tweet, ...
1
vote
0answers
22 views
Double Saving after AJAX-Call
i have a weird problem by saving a record with AJAX and Rails. I want to save a record by using drag'n drop with jQuery Sortable (http://jqueryui.com/sortable/#connect-lists). The saving is working ...
0
votes
1answer
26 views
AJAX and Rails: Parsererror
I have an AJAX call to my rails API that only renders JSON and I keep getting a parsererror. I tried various things but nothing works.
Here is my ajax call
$.ajax('/api/users/show/:id', {
type: ...
0
votes
2answers
50 views
AJAX success function not being called
I am trying to get the success function from an AJAX call to fire. I know it is properly working because I am hitting my own API and I can see it is properly hitting the URL and the server is ...
0
votes
1answer
9 views
Changing a div after a form submission using ruby on rails and ajax
I have a from being submitted via Ajax. After this form is submitted I want to take the new information and replace a div already on the screen.
<div style="float: left; margin-left: 10px; ...
0
votes
1answer
14 views
Repeated objects in Kaminari
I have an array of objects in my controller, paginated by Kaminari:
@pics = Pic.page(params[:page]).per(12).order(sort_column)
I render each new set of 12 pics on the same page with an AJAX ...
1
vote
1answer
26 views
Accessing Rails instance variable in AngularJS
I am trying to set a $scope.list variable in angular to be equal to a @users variable in my rails controller under the index method...any help?
ex: $scope.list = Users.query();
User_profile.rb ...
0
votes
2answers
29 views
Rails / Unobtrusive Javascript - link_to_remote :update
After looking around (a lot) I've dug through numerous posts on the subject, but I'm really confused since this issue seems to mainly have been addressed a while back (when the change happened) and ...
1
vote
0answers
23 views
Using Ajax to load a TinyMCE text area
EDIT:
After doing what Kiran Kumara suggested by adding
<div id="static_id></div>
to the end of "index.html.erb" and changing "edit.js.erb" to contain the following:
...
0
votes
1answer
27 views
Can ajax:success .on() be bound to a class selector?
My success callback is not firing when I bind it to a class selector.
Instance of the class:
<div id="entries">
...
<a href="/entries/user_tag_search?search=Fly+Tying" ...
0
votes
1answer
19 views
Changing data stored in a div using ajax and ruby on rails
Does anyone know a good guide or example for me to follow on how to change data on the screen using ajax?
I have a div that stores the last @event_status and every 5 minutes I want to go get the last ...
0
votes
2answers
19 views
how can I use rspec to test an Ajax request?
I am trying to test an ajax request in rspec, but am not quite sure how to do it at this point It doesnt matter if it is rspec or capybara, I am just trying to get the test to pass, any advice is ...