Where should a ruby constant live? -


 %div{:id=>[arsenal[@home.page_color]], :class=> "page"} 

i'm using following constant arsenal in home#page view. should constant live in order used view in ruby on rails?

right i'm met actionview::template::error (uninitialized constant actionview::compiledtemplates::arsenal):

you can define in own initializer file:

#config/initializers/setup_constants.rb arsenal = ["ccc", "ddd",...] 

Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -