Skip to content

Commit

Permalink
modifications to the what gets injected. needed to commit this a whil…
Browse files Browse the repository at this point in the history
…e ago.
  • Loading branch information
gigonaut committed Mar 17, 2009
1 parent f626763 commit 2625ec3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions lib/has_many_members/has_many_members.rb
Expand Up @@ -73,8 +73,6 @@ def is_member?(member)
def editable_by?(member)
if member.has_role?(:admin)
true
elsif self.creator_id == member.id
true
elsif active_members.include? member
true
else
Expand Down
2 changes: 1 addition & 1 deletion lib/has_many_members/is_member.rb
Expand Up @@ -11,7 +11,7 @@ def is_member(options={})
options[:of].each do |thing|
has_many thing, :through => :memberships, :as => :joinable, :source_type => thing.to_s.capitalize.singularize, :source => :joinable do
def default
find(:first, :conditions => ["memberships.default_membership=?", true])
find(:first, :conditions => ["memberships.default_membership=?", true]) || find(:first, :conditions => ["memberships.member_type=?", "admin"])
end
end
end
Expand Down

0 comments on commit 2625ec3

Please sign in to comment.