Thursday, December 8, 2011

[Rails] Responding to different html requests

I find in my controllers that I often want to respond to two types of
request for html in the same action:

1) A full page request in which the whole page should be rendered
2) A request in which a partial should be rendered without the whole
layout

I have handled this by passing a parameter in the url to indicate which
one to return but that feels ugly and I wonder if there are better ways?

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


Real Estate