people
not use rjs, its ugly

Ivan Nastyukhin
dieinz...@me.com






On Jun 3, 2010, at 5:28 PM, Bill Walton wrote:

> Hi Greg,
> 
> On Thu, Jun 3, 2010 at 8:05 AM, Gregory Mar <li...@ruby-forum.com> wrote:
>> Hi,
>> I am working on a mobile device dev using javascript and I use a remote
>> Rails app for the backend.
>> I query the backend using Ajax, and I would like to know if from my
>> controller I can return a partial in response to the ajax request?
>> 
> 
> If you're asking if you can return it specifically from the controller
> rather than through an rjs template / view, the answer is yes.
> 
> render :update do |page|
>  page.which_ever_method_you_need
> end
> 
> But I tend to agree with Ivan.  If you're trying to get html to your
> javascript app, it'll probably be easier in the long run to send json
> and build the html on the client.
> 
> HTH,
> Bill
> 
> -- 
> 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...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
> 

-- 
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...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to