lib/access/member.rb in access-2.0.44 vs lib/access/member.rb in access-2.0.46
- old
+ new
@@ -8,10 +8,11 @@
def initialize(values)
self.class.class_eval {attr_reader *values.keys + [:user] }
values.each do |attribute_name, attribute_value|
self.instance_variable_set("@#{attribute_name}", attribute_value)
end
- @user = @user ? Access::User.new(@user) : nil
+ @user = Access::User.new(@user) if @user
+ @member = Access::Member.new(@member.tap {|m| m.delete(:user) }) if @member
@program = Access::Program.new(@program) if @program
@organization = Access::Organization.new(@organization) if @organization
end
def self.show(member_key, options = {})