On May 4, 10:15 am, Chandu80
<chandu.she...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello All,
> I have a query written using the Rails update statement as follows,
>
> updated_value = Channel.update(user_default_channel, :is_public =>
> public_or_private_value )
>
> This basically updates the respective row in the channels table in my
> db and fired over an ajax call(using a link_to_remote)
> However the query does not work always (say out of 10 attempts it
> fails once).Is this a problem with AJAX or does an connection.save is
> needed after the query is fired or is there any other work around for
> the same.
> If an explicit save is required,kindly let me know the syntax.
>
you shouldn''t need an explicit save. Have you checked to see if any
validations are failing or perhaps your code is suffering from a race
condition (2 things trying to update the same row in quick
succession) ?
Fred> Thanks in Advance
>
> Regards
> Chandrika
--
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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.