Displaying 2 results from an estimated 2 matches for "has_moderators".
2006 Jul 11
0
Should I use exclamation marks for methods that change associations?
...exclamation mark
because it clarifies the difference between methods.
user.has_role! ''site_admin''
user.has_role? ''site_admin''
user.is_moderator_of_what
user.is_moderator_of! group
user.is_moderator_of? group
group.has_moderators
group.has_moderators?
The "group.has_moderators" case shows how there might be some
ambiguity. Methods like has_blahs on models return an array of user
objects that have role "blah". The has_moderators method doesn''t set a
role, but it might be clear because sa...
2006 Jul 19
0
Authorization Plugin 1.0 rc3 + Test App
...ethods that draw on the defined roles.
You will be able to use methods like "user.is_fan_of angelina",
"user.is_fan_of_what", or "angelina.has_fans?", where a ''fan'' is only
defined in the roles table. Models also pick up has_* methods like
"group.has_moderators" (returns array of users who have role
''moderator'') and "group.has_moderators?"
* Pick-and-choose a mixin for your desired level of database
complexity. For all the features, you will want to use "object roles
table"