[Rails] Re: Headache with Ajax in Rails using jQuery
Thanks "unknown".
Now that I already went down the jQuery path for Ajax, I would like to
stick with it for a while. I'm most concerned about this portion of my
code:
def contact
name = params[:name]
message = params[:message]
respond_to do |format|
format.html # contact.html.erb
format.json {
render :response => {:name => name, :message => message}
}
end
end
Did I render :response in json correctly ? Thanks.
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/14109904ee7616333bf4c5a05c49fa02%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home