View (or template) to helper to view ... magic

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs