rails-settings icon indicating copy to clipboard operation
rails-settings copied to clipboard

Manage settings with Ruby on Rails

Results 24 rails-settings issues
Sort by recently updated
recently updated
newest added

Hi, Is there anyway you could show usage for global settings? I don't want settings stored on the instance level but on some something like: FooSettings.time_stamp = DateTime.now I only...

``` RailsSettings::SettingObject Load (0.4ms) SELECT "settings".* FROM "settings" WHERE "settings"."target_id" = $1 AND "settings"."target_type" = $2 [["target_id", 26], ["target_type", "Campaign"]] ↳ app/models/campaign.rb:120 [active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (1.61ms) Completed 200...

It appears that the target class isn't being assigned a default_settings hash. Why might this be the case? I've tried it on two different models in our codebase. Using Rails...

in case when A < ActiveRecord::Base and B < A has_settings doesn't work correct inside B. Probably this is caused because target_type use base_class which will return A even if...

Hi there, I have: - converted my `value` column to postgres JSON - commented out [`serialize :value, Hash`](https://github.com/ledermann/rails-settings/blob/master/lib/rails-settings/setting_object.rb#L16) inside SettingObject Its working beautifully. This setup allows me to query nested...

I want to be able to have validations on settings and also have defaults for them. It would seem this can't be done due to line 27 in configuration.rb.

I'd used the 1.0.1 version but now I want to use the newer version of the gem but as I'm not sure how can I migrate my old settings to...

After digging around the code it seems not easily patchable for adding attribute types. For example, would love to write: ``` has_settings do |s| s.key :admin, defaults: {admin: false}, types:...

I'm using the validation, as the docs recommends. `errors.add(:base, "format is invalid")` But will output: Setting objects base format is invalid How to remove "Setting objects" from the error message?

Hi, I'm wondering if there is a way to include the settings.all hash when you're converting a user object to JSON, such as: `user.to_json(:include => :settings)` `user.to_json(:include => { :settings...