README.md in superstore-1.0.12 vs README.md in superstore-1.1.0

- old
+ new

@@ -26,18 +26,27 @@ before_create do self.description = "#{name} is the best product ever" end end ``` + +The table name defaults to the case-sensitive, pluralized name of the model class. To specify a +custom name, set the ```table_name``` attribute on the class: + +```ruby +class MyWidget < Superstore::Base + table_name = 'my_widgets' +end +``` ## Using with Cassandra Add the cassandra-cql gem to Gemfile: ```ruby gem 'cassandra-cql' ``` - + Add a config/superstore.yml: ```yaml development: adapter: cassandra @@ -53,11 +62,11 @@ Add the pg gem to your Gemfile: ```ruby gem 'pg' ``` - + And a config/superstore.yml: ```yaml development: adapter: hstore @@ -70,11 +79,11 @@ ```ruby widget = Widget.new widget.valid? widget = Widget.create(name: 'Acme', price: 100) widget.update_attribute(:price, 1200) -widget.update_attributes(price: 1200, name: 'Acme Corporation') +widget.update(price: 1200, name: 'Acme Corporation') widget.attributes = {price: 300} widget.price_was widget.save widget.save! ``` @@ -95,6 +104,6 @@ Some lightweight scoping features are available: ```ruby Widget.where('color' => 'red') Widget.select(['name', 'color']) Widget.limit(10) -``` \ No newline at end of file +```