README.markdown in roles_data_mapper-0.1.0 vs README.markdown in roles_data_mapper-0.1.1
- old
+ new
@@ -25,25 +25,31 @@
<code>rake install</code>
## Rails generator
-_Note_:
-
-*The Rails generator is a bit "rusty" and hasn't been tested with the latest changes. I hope to update it soon.*
-
The library comes with a Rails 3 generator that lets you populate a user model with a given role strategy
The following role strategies are included by default. Add your own by adding extra files inside the strategy folder, one file for each role strategy is recommended.
* admin_flag
-* inline_role
-* inline_roles
-* role_relations
-* role_mask
+* many_roles
+* one_role
+* roles_mask
+* role_string
-Example:
+*Roles generator*
+Apply :admin_flag Role strategy to User model using default roles :admin and :guest (default)
+
<code>$ rails g data_mapper:roles User --strategy admin_flag</code>
+
+Apply :admin_flag Role strategy to User model using default roles and extra role :author
+
+<code>$ rails g data_mapper:roles_migration User --strategy admin_flag --roles author</code>
+
+Apply :one_role Role strategy to User model without default roles, only with roles :user, :special and :editor
+
+<code>$ rails g data_mapper:roles_migration User --strategy one_role --roles user special editor --no-default-roles</code>
## Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.