Re: Changing render semantics?
Got a chance today to verify all my apps and I am not using the multiple argument for of render. So go for it Magnus! :-) On 4/24/2010 4:39 PM, Magnus Holm wrote: I'm trying to integrate Tilt (for providing Haml etc. support), but are having some problems supporting both the previous `render` and this new `render`. Previous render: - loads Markaby when needed - Always wraps the layout - render :index # => Calls index() within Markaby - render :index, 1, 2 # => Calls index(1, 2) within Markaby What I want from the new render: - loads Markaby when needed - loads Tilt when needed - render :index, :layout => false # => Don't wraps the layout - render :foo # => Will check #{VIEW_PATH}/foo.* and render that file (falling back on the Markaby methid) - render :foo, :locals => { :bar => 123 } # => Same as above, but with local variables set - render :index, :locals => { :foo => 123 } # => :locals is ignored if it's a Markaby method I guess the question is: Does anybody actually use `render` with multiple arguments (render :index, 1, 2)? If not, I guess we can easily switch to this new `render` without breaking code. // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Re: Changing render semantics?
On Sat, Apr 24, 2010 at 3:39 PM, Magnus Holm wrote: > > I guess the question is: Does anybody actually use `render` with > multiple arguments (render :index, 1, 2)? If not, I guess we can > easily switch to this new `render` without breaking code. > > I do not use the multi-argument form of render. I didn't even know you could do that. --beppu ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list
Changing render semantics?
I'm trying to integrate Tilt (for providing Haml etc. support), but are having some problems supporting both the previous `render` and this new `render`. Previous render: - loads Markaby when needed - Always wraps the layout - render :index # => Calls index() within Markaby - render :index, 1, 2 # => Calls index(1, 2) within Markaby What I want from the new render: - loads Markaby when needed - loads Tilt when needed - render :index, :layout => false # => Don't wraps the layout - render :foo # => Will check #{VIEW_PATH}/foo.* and render that file (falling back on the Markaby methid) - render :foo, :locals => { :bar => 123 } # => Same as above, but with local variables set - render :index, :locals => { :foo => 123 } # => :locals is ignored if it's a Markaby method I guess the question is: Does anybody actually use `render` with multiple arguments (render :index, 1, 2)? If not, I guess we can easily switch to this new `render` without breaking code. // Magnus Holm ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list