Why not just set an instance variable on the controller within the
respond_to block and then conditionally render within the view based
on it''s value?
On Feb 19, 5:56 pm, Josh
<jjkie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> i am using respond_to for a few actions in my controller. for some of
> the actions, the view for html and the view for javascript would be
> nearly identical.
>
> what can i do in my views to hide or add content based on whether
> there was an ajax request or not?
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---