huacnlee / rails-settings-cached

Global settings for your Rails application.
Other
1.06k stars 202 forks source link

Is there a way to set default setting for model? #118

Closed niksfirefly closed 5 years ago

niksfirefly commented 8 years ago

Is there a way to set default settings for model?

in app.yml

model:
 setting1: value
 setting2: value

or in model file itself?

mttwng commented 7 years ago

👍 Was also looking for a way to do this, did you find a way?

vfonic commented 7 years ago

👍 ended up here trying to find the same thing

joshmn commented 6 years ago

I wrote something to handle this.

https://github.com/joshmn/setsy

armenarmen commented 6 years ago

My work around is having the defaults plugged into an after_create on the model in question

huacnlee commented 5 years ago

2.x, 0.x can do that.