Ruby on Rails Thursday, April 29, 2010

I early Rails 2, I wrote code in my show.erb.html file like this:

<% display_qs_body(binding) %>

display_qs_body was in a helper file and it passed binding along and
used (as I recall) concat(binding, "text"). concat changed so you no
longer passed binding somewhere later in Rails 2.

I came to believe that this worked but was not really the proper way to
do things. So, that is really what I'm asking... how is a view suppose
to call into a helper which may call into a template which calls back to
a helper, etc.

The helpers may or may not want to prepend or append text to what the
next level deeper.

And, since Rails 3 is just around the corner, how does this sort of
thing work in Rails 3?

Thank you,
Perry
--
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.

No comments:

Post a Comment