Module: Saucy::Project
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#assign_default_permissions ⇒ Object
78 79 80 81 82 83 |
# File 'lib/saucy/project.rb', line 78 def account.memberships.where(:admin => true).each do |membership| self..build(:membership => membership) end self end |
#has_member?(user) ⇒ Boolean
72 73 74 75 76 |
# File 'lib/saucy/project.rb', line 72 def has_member?(user) . joins(:membership). exists?(:memberships => { :user_id => user.id }) end |
#to_param ⇒ Object
68 69 70 |
# File 'lib/saucy/project.rb', line 68 def to_param keyword end |