Tuesday, May 28, 2013

Re: [Rails] Re: Headache with Ajax in Rails using jQuery

On 28 May 2013 03:46, Tommy Ng <lists@ruby-forum.com> wrote:
> 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:

If you want to use Rails it is generally best to stick to the rails
conventions, that way you will find it easier to get help here.

Have a look at the Rails Guides on debugging, that will show you
techniques that you can use to debug your code.

Colin

>
> 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.
>
>

--
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/CAL%3D0gLsUgUYoN6KKA9CcB13HSXs4WR88ktLvfDPZRtMioopUTg%40mail.gmail.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


Real Estate