2009/6/18 doug <[email protected]>: > > I have seen a number of examples where HTML code is treated as a Ruby > block. For example, here is one taken from the Agile Rails book: > > <% content_for( :sidebar) do %> > <ul> > <li>this text will be rendered</li> > <li>and saved for later</li> > <li>it may contain <%= "dynamic" %> stuff</li> > </ul> > <% end %> > > I have no idea how this works. Can someone please give me a clue as > to how this works? Additionally (and this is what I am really trying > to do) I'm wondering if there isn't some way I could use this approach > to display a block of HTML code conditionally. Any ideas? > > Thanks for any input. > > ... doug
It might be worth your while working through some of the rails guides at http://guides.rubyonrails.org/, particularly the Getting Started guide. This should get you going with the fundamental operation of Rails. Good luck Colin --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---

