Permalink
Browse files

role helpers

  • Loading branch information...
kristianmandrup committed Nov 24, 2011
1 parent e200b2c commit a2b619741866cca0b79628e579205af9e4ceba04
Showing with 41 additions and 0 deletions.
  1. +5 −0 lib/cantango/helpers.rb
  2. +18 −0 lib/cantango/helpers/role.rb
  3. +18 −0 lib/cantango/helpers/role_group.rb
View
@@ -0,0 +1,5 @@
+module CanTango
+ module Helpers
+ autoload_modules :Role, :RoleGroup
+ end
+end
@@ -0,0 +1,18 @@
+module CanTango
+ module Helpers
+ module Role
+ def has_role_meth
+ config.roles.has_method
+ end
+
+ def roles_list_meth
+ config.roles.list_method
+ end
+
+ def config
+ CanTango.config
+ end
+ end
+ end
+end
+
@@ -0,0 +1,18 @@
+module CanTango
+ module Helpers
+ module RoleGroup
+ def has_role_group_meth
+ config.role_groups.has_method
+ end
+
+ def role_groups_list_meth
+ config.role_groups.list_method
+ end
+
+ def config
+ CanTango.config
+ end
+ end
+ end
+end
+

0 comments on commit a2b6197

Please sign in to comment.