Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
kraatob committed Nov 11, 2009
1 parent 8cb7972 commit e47e2e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.rdoc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ Aegis assumes that the corresponding database table has a string-valued column
called +role_name+. You may override the name with the <tt>:name_accessor => called +role_name+. You may override the name with the <tt>:name_accessor =>
:my_role_column</tt> option. :my_role_column</tt> option.


You can define a default role for a model by saying
class User < ActiveRecord::Base
has_role :default => :admin
end
All this will do, is initialize the +role_name+ with the given default when
+User.new+ is called.

The roles and permissions themselves are defined in a class inheriting from The roles and permissions themselves are defined in a class inheriting from
<b>Aegis::Permissions</b>. To define roles you create a model <tt>permissions.rb</tt> <b>Aegis::Permissions</b>. To define roles you create a model <tt>permissions.rb</tt>
and use the *role* method: and use the *role* method:
Expand Down

0 comments on commit e47e2e9

Please sign in to comment.