I have the same problem.
I am translating an old ASP-application (pre dot.net) that uses textual 
includes to implement DRY.
When I try to use ERB for this I get scoping problems

* Variables or functions declared in the subtemplate I try to read with 
erb are not 'remembered' when returning to the main view (that did the 
erb call)

Note. if a variable was declared the first time in the main view it is 
possible to change the value of that variable in the subtemplate and 
that new value is 'remembered'.

I can't see how you can implement good DRY-solution in ruby/rails given 
the above problem but it should be possible since ruby/rails is a much 
newer/more modern framework than old asp.

Of course you can put the methods in an helper method but then you don't 
have access to the <% %> tags and you don't have access to variables 
declared in the view.

Very grateful for any help!

/Kristofer
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to