[Rails] Re: how to display for errors using js request
I finally solved this issue ...passing the locals ...
$('#resource_error_explanation').html("<%= escape_javascript( render
'shared/error_messages', :target => [resource] ) -%>");
is not valid ...
in the controller I have now @target = [resource] and I am
passing :locals => {:target => @target}
I modified also the partial to use target and that's it...
it tooks time to switch my mind to non-obstrusive js , but I
understand it better and of course I appreciate it
On Jun 2, 8:03 pm, radhames brito <rbri...@gmail.com> wrote:
> You forgot to post you controller code, that the most important part
--
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@googlegroups.com.
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home