docbrown/lib/generators/settings_model/templates/model.erb
Michael Kohl 847d8a8590
Add settings model generator (#13003)
* Add settings model generator

* Obey the CodeClimate overlords

* Update generator

* Update USAGE

* Add Zeitwerk exception
2021-03-19 12:55:31 +01:00

13 lines
433 B
Text

module Settings
class <%= class_name %> < RailsSettings::Base
self.table_name = :<%= table_name %>
# The configuration is cached, change this if you want to force update
# the cache, or call Settings::<%= class_name %>.clear_cache
cache_prefix { "v1" }
# Define your fields
# field :host, type: :string, default: "http://localhost:3000"
# field :default_locale, default: "en", type: :string
end
end