diff --git a/README.md b/README.md index 4bb6c13..f22738d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # JsonPreference +This project is a folk of [serial_preference](https://github.com/punchh/serial_preference) and uses JSON type to store preferences for better performance. + If you have a large number of settings/preferences on your model (like a company or a businesss) and you store each preference in a separate model or in separate columns on the model itself, it diff --git a/gemfiles/rails_4.2.gemfile.lock b/gemfiles/rails_4.2.gemfile.lock index fa8bd74..9d495c2 100644 --- a/gemfiles/rails_4.2.gemfile.lock +++ b/gemfiles/rails_4.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - json-preference (1.0.2) + json-preference (1.0.3) activerecord (>= 3.0.0) activesupport (>= 3.0.0) diff --git a/gemfiles/rails_4.gemfile.lock b/gemfiles/rails_4.gemfile.lock index e0ba0e5..acd292f 100644 --- a/gemfiles/rails_4.gemfile.lock +++ b/gemfiles/rails_4.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - json-preference (1.0.2) + json-preference (1.0.3) activerecord (>= 3.0.0) activesupport (>= 3.0.0) diff --git a/gemfiles/rails_5.2.2.gemfile.lock b/gemfiles/rails_5.2.2.gemfile.lock index dded5ac..07de2a1 100644 --- a/gemfiles/rails_5.2.2.gemfile.lock +++ b/gemfiles/rails_5.2.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - json-preference (1.0.2) + json-preference (1.0.3) activerecord (>= 3.0.0) activesupport (>= 3.0.0) diff --git a/gemfiles/rails_5.gemfile.lock b/gemfiles/rails_5.gemfile.lock index 8400148..a58705e 100644 --- a/gemfiles/rails_5.gemfile.lock +++ b/gemfiles/rails_5.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - json-preference (1.0.2) + json-preference (1.0.3) activerecord (>= 3.0.0) activesupport (>= 3.0.0) diff --git a/gemfiles/rails_6.gemfile.lock b/gemfiles/rails_6.gemfile.lock index 698879f..d0bd027 100644 --- a/gemfiles/rails_6.gemfile.lock +++ b/gemfiles/rails_6.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - json-preference (1.0.2) + json-preference (1.0.3) activerecord (>= 3.0.0) activesupport (>= 3.0.0) diff --git a/gemfiles/rails_7.gemfile.lock b/gemfiles/rails_7.gemfile.lock index a656443..fc4a69e 100644 --- a/gemfiles/rails_7.gemfile.lock +++ b/gemfiles/rails_7.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - json-preference (1.0.2) + json-preference (1.0.3) activerecord (>= 6.0.0) activesupport (>= 6.0.0) diff --git a/lib/json-preference/serializer.rb b/lib/json-preference/serializer.rb index a690a92..2a30fa6 100644 --- a/lib/json-preference/serializer.rb +++ b/lib/json-preference/serializer.rb @@ -6,8 +6,7 @@ def self.dump(hash) def self.load(hash) return if hash.nil? - # hash.try(:with_indifferent_access) - hash.try(:deep_symbolize_keys) + hash.try(:with_indifferent_access) end end end \ No newline at end of file diff --git a/lib/json-preference/version.rb b/lib/json-preference/version.rb index f55b0d6..b88807e 100644 --- a/lib/json-preference/version.rb +++ b/lib/json-preference/version.rb @@ -1,3 +1,3 @@ module JsonPreference - VERSION = "1.0.2" + VERSION = "1.0.3" end