Closed anujmiddha closed 3 years ago
Version 2.7.x has allows you to add any options for field.
https://github.com/huacnlee/rails-settings-cached/releases/tag/v2.7.0
class Setting
field :my_key, type: :string, description: "Hello world", placeholder: "My key"
end
And the you can use get_field
to get description
field = Setting.get_field("my_key")
field[:options]
=> { description: "Hello world", placeholder: "My key" }
We might need to add certain metadata with each field. This pull request adds this support.
For example, we can add description with different fields, which can be shown on the admin page for updating the fields.