[Rails] Re: Rails 3: Update responding with empty json

2010-10-14 Thread Aashish Kiran
I found the solution. use firebug to see response. Use image as attachment for help -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@goog

[Rails] Re: Rails 3: Update responding with empty json

2010-10-13 Thread Aashish Kiran
Hi all, I too have same problem. Problem: I am getting "successfully stored." alert message, but getting "null" value in suceeding alert message. whether as expected data is {"id" => "xx"} the code is as follows controller code @tmp = {} @tmp[:id] = "

[Rails] Re: Rails 3: Update responding with empty json

2010-08-03 Thread Rasmus Nielsen
Fabio Kreusch wrote: > I am still stuck with this. Does anyone knows if this is the expected > beavior for Rails? Should respond_with on update really return an > empty json object? I pretty sure the Rails behavior is as intended. Rails basically says the save was successful by returning a 200 st

[Rails] Re: Rails 3: Update responding with empty json

2010-03-29 Thread Fabio Kreusch
I am still stuck with this. Does anyone knows if this is the expected beavior for Rails? Should respond_with on update really return an empty json object? On Mar 23, 7:17 pm, Fabio Kreusch wrote: > No ideas? > > On Mar 22, 7:42 pm, FabioKreusch wrote: > > > > > This is it (HAML): > > > #category-

[Rails] Re: Rails 3: Update responding with empty json

2010-03-23 Thread Fabio Kreusch
No ideas? On Mar 22, 7:42 pm, Fabio Kreusch wrote: > This is it (HAML): > > #category-form >   - form_for @category, :remote => true do |f| >     %fieldset >       %legend= t('activerecord.models.category') >       %p >         = f.label :name >         %br >         = f.text_field :name >      

[Rails] Re: Rails 3: Update responding with empty json

2010-03-22 Thread Fabio Kreusch
This is it (HAML): #category-form - form_for @category, :remote => true do |f| %fieldset %legend= t('activerecord.models.category') %p = f.label :name %br = f.text_field :name %p %button{:type => 'submit', :class => 'positive'}= t('dashboard.

Re: [Rails] Re: Rails 3: Update responding with empty json

2010-03-21 Thread Conrad Taylor
On Sun, Mar 21, 2010 at 6:27 PM, Fabio Kreusch wrote: > Hi Conrad, > I have tried Rails console, and while trying to convert to json the > results were the expected. > > This is the Jquery code used on my ajax form: > > $('#category_form').submit(function() { >var form = $(this); >$.ajax(

[Rails] Re: Rails 3: Update responding with empty json

2010-03-21 Thread Fabio Kreusch
Hi Conrad, I have tried Rails console, and while trying to convert to json the results were the expected. This is the Jquery code used on my ajax form: $('#category_form').submit(function() { var form = $(this); $.ajax({ url: form.attr('action'), type: 'POST', data: form

Re: [Rails] Re: Rails 3: Update responding with empty json

2010-03-21 Thread Conrad Taylor
On Sun, Mar 21, 2010 at 4:41 PM, Fabio Kreusch wrote: > Thanks Conrad, I have removed the save call from the code, but it > continues to return an empty JSON on success case. > Any more clues? > > Fabio, what happens in the Rails 3 console? For example, you can do the following in the Rails cons

[Rails] Re: Rails 3: Update responding with empty json

2010-03-21 Thread Fabio Kreusch
Thanks Conrad, I have removed the save call from the code, but it continues to return an empty JSON on success case. Any more clues? On Mar 21, 3:37 pm, Conrad Taylor wrote: > On Sun, Mar 21, 2010 at 9:44 AM, Fabio Kreusch wrote: > > Hi all! > > > I'm playing with Rails 3, and on one of my contr