How do use a different view for an action but with the same layout?

4 views
Skip to first unread message

veto

unread,
Oct 20, 2009, 6:17:12 AM10/20/09
to Ramaze
Hi,
I need to render different forms in the view but i only like to use
one action for it.
i tried #respond(render_view(:service_1))
but it won't render the layout.

veto

Michael Fellinger

unread,
Oct 20, 2009, 7:26:27 AM10/20/09
to ram...@googlegroups.com

The quick and dirty way:
action.view = nil
return render_view(:service_1)

The other quick and dirty way:
respond render_custom(:service_1){|action| action.method = nil }

> veto

--
Michael Fellinger
CTO, The Rubyists, LLC

Reply all
Reply to author
Forward
0 new messages