[Nitro] how to initialize @color and make it visible into the template?
George Moschovitis
george.moschovitis at gmail.com
Tue Jul 10 02:55:55 EDT 2007
>
> >> > <div style="color: \#{#{@color}}">
>
hmm, thats what happens when you try to anwser emails before breakfast ;-)
you are right.
we could abstract this by means of a helper method 'var', like this:
<div style="color: #{val(:color)}">
where
def var(sym)
%|\#{#{instance_variable_get("@#{sym}")}}|
end
(i hope the above is right, still no breakfast ;-) )
any good name suggestions for the 'var' helper method?
-g.
--
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070710/73e284b8/attachment.html
More information about the Nitro-general
mailing list