Im using the following code within a method called a_level:
if(@program.theme==MyHelper::TemplateConstants::DEFAULT_LAYOUT)
style = 'border: none'
elsif(@program.theme == MyHelper::TemplateConstants::LOGO_LAYOUT)
style = 'border: top'
end
And the following within a method called b_level:
if(@program.theme==MyHelper::TemplateConstants::DEFAULT_LAYOUT)
style = 'color: #888;'
elsif(@program.theme == MyHelper::TemplateConstants::LOGO_LAYOUT)
style = 'color: #666;'
in the same helper. I want to use a hash instead, something like
my_styles = { :level_a => {... }, :level_b => {...} }
Im not getting it right.
Any help is appreciated!
I think you’re looking for this:
and then in
program_logo:and in
do_not_reply:Or perhaps it would make more sense to arrange your
style_hashlike this:And then access it like this: