Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #4687
| From | 7stud -- <bbxx789_05ss@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: Ruby/Sinatra - Variable inside erb calls |
| Date | 2011-05-17 14:16 -0500 |
| Organization | Service de news de lacave.net |
| Message-ID | <796f35470268b3a40b164d45fc480fce@ruby-forum.com> (permalink) |
| References | <69d0c8c5a3b8782605829508018eef60@ruby-forum.com> <7011113ad9646a11b7fef0900f1ee153@ruby-forum.com> |
Eugen Ciur wrote in post #999234:
>
> (drop ':' operator, it is not necessary).
>
According to the Sinatra docs, it must be a symbol.
So I would just use string interpolation:
erb :"templates/#{style}/layout"
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Ruby/Sinatra - Variable inside erb calls Eugen Ciur <ciur.eugen@gmail.com> - 2011-05-17 06:34 -0500 Re: Ruby/Sinatra - Variable inside erb calls 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-17 14:16 -0500
csiph-web