README.md in active_repository-0.0.4 vs README.md in active_repository-0.0.5
- old
+ new
@@ -44,10 +44,23 @@
$ gem install active_repository
## Usage
-TODO: Write usage instructions here
+Firstly you must inherit ActiveRepository::Base:
+
+ class User < ActiveHash::Base
+ # Defines the fields of the class
+ fields :name, :email, :birthdate
+
+ # Defines the class responsible for persisting data
+ set_model_class(Country)
+
+ # Set this to true in order to ignore model_class attribute and persist in memory
+ set_save_in_memory(true)
+ end
+
+Then it is just using it as if it was your ActiveRecord model or Mongoid Document.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)