ruby on rails - Page title variable, can I fetch from file also? -


in main layout page, have this:

<title> title_from_config || @page_title </title> 

basically if page_title variable wasn't set, use default page title.

i want default page title config file or something, suggest use this?

this rails 3.

you can add initializer file (config/initializers/constants.rb) contains config options application. make sure use ruby constants here they're available in top-level namespace of application.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -