Ruby on Rails - Storing application configuration -


I have a relatively simple rail app and I would like to store different configuration settings that can be changed when an admin user The application is running For example, to allow comments on the post or to change the display format of the date.

I know that I can configure environment etc. in the environment.rb file, although they are loaded only when the server restarts.

Is there an alternative location Can I define this information or would it be better to put it in the database?

Any advice appreciated.

Thank you.

You can use the database to create a separate table "Settings" that will give you the necessary key / value Stores the parameters. The negative side of this solution is a performance hit (DB asks every time you need setting) To correct this issue, you can read / write through the "cash_money" cache or "RailScash"


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -