docbrown/lib/generators/settings_model/templates/model.erb
Michael Kohl a885483059
Introduce Settings::Base (#14138)
* Introduce Settings::Base

* Temporarily re-add gem

* Update Settings::Base to use RequestStore

* Add after_commit hook

* Restructure code

* Finish specs, rename field -> setting

* Update comment

* Undo unrelated change

* Remove redundant get_default

* Fix Doorkeeper issue

* Update docs/backend/configuration.md

Co-authored-by: Josh Puetz <josh@dev.to>

* Clarify comment and documentation

* Update vendored gems

* Fix nil-handling bug in Settings::Base

* Remove accidentaly changes from Gemfile.lock

* Update vendored gems

Co-authored-by: Josh Puetz <josh@dev.to>
2021-08-30 10:27:08 +07:00

9 lines
272 B
Text

module Settings
class <%= class_name %> < RailsSettings::Base
self.table_name = :<%= table_name %>
# Define your settings
# setting :host, type: :string, default: "http://localhost:3000"
# setting :default_locale, default: "en", type: :string
end
end