On Sunday 31 January 2010, Marnen Laibow-Koser wrote:
> Michael Schuerig wrote:
> [...]
> 
> > Helpers are procedural by nature. helper :all drives out the last
> > bit of polymorphism there was.
> 
> Why do you say that?  I don't understand, except to the extent that
> Rails views are sort of procedural.

If you only include specific helper modules, you can have multiple 
methods with the same name, but different implementations. This can be 
useful in order to avoid inadvertently stepping on another method with 
the same name in an overcrowded helper namespace. More interestingly, 
you can have generically named helper methods with implementations 
appropriate for different model classes.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/

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