README.markdown in dynabix-0.3.1 vs README.markdown in dynabix-0.3.2
- old
+ new
@@ -7,12 +7,23 @@
Overview
--------
Dynabix dynamically creates read/write accessors on ActiveRecord models for
-storing attributes in a serialized Hash.
+storing attributes in a serialized Hash. Read more in our introductory
+[blog article](http://www.gearheadforhire.com/articles/ruby/dynabix/activerecord-gem-for-attribute-serialization).
+ActiveRecord's native 'store' method
+------------------------------------
+
+ActiveRecord as of 3.2.1, has a very similar native method
+[store](http://apidock.com/rails/ActiveRecord/Store). Dynabix differs
+from store by providing a declarative DSL for defining multiple stores
+(Ruby 1.9+), has separate read/write accessors, and stores to the database
+as HashWithIndifferentAccess. Unless you need one of these specific
+features, using the native 'store' method is recommended.
+
Installation
------------
Add to your Gemfile
@@ -72,11 +83,11 @@
# read-only
metadata_reader :friends_with_spoons
end
-Specifying attributes for full attributes accessors in one step
+Specifying attributes for full attribute accessors in one step
class Thing < ActiveRecord::Base
has_metadata :metadata, :breakfast_food, :wheat_products, :needs_milk
end
@@ -84,11 +95,11 @@
thing = Thing.new
thing.breakfast_food = 'a wheat like cereal"
- # same thing, but not using the hash directly
+ # same thing, but using the hash directly
thing.metadata[:breakfast_food] = 'a wheat like cereal"
### Ruby 1.9+
Dynabix under Ruby 1.9+ enables specifying multiple metadata columns on a model.
@@ -109,17 +120,17 @@
class Thing < ActiveRecord::Base
has_metadata :cows
has_metadata :chickens, :tasty, :feather_count
# read-only
- cow_reader :likes_milk, :hates_eggs
+ cows_reader :likes_milk, :hates_eggs
# write-only
- cow_writer :no_wheat_products
+ cows_writer :no_wheat_products
# extra full accessors for chickens
- chicken_accessor :color, :likes_eggs
+ chickens_accessor :color, :likes_eggs
end
Runtime dependencies
--------------------
@@ -149,6 +160,6 @@
rake spec # Run RSpec
Copyright
---------
-Copyright (c) 2012 GearheadForHire, LLC. See [LICENSE](LICENSE) for details.
+Copyright (c) 2012-2017 GearheadForHire, LLC. See [LICENSE](LICENSE) for details.