Class: Effective::CommitteeMember
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::CommitteeMember
- Defined in:
- app/models/effective/committee_member.rb
Instance Attribute Summary collapse
-
#committee_ids ⇒ Object
Returns the value of attribute committee_ids.
-
#user_ids ⇒ Object
Returns the value of attribute user_ids.
Instance Method Summary collapse
Instance Attribute Details
#committee_ids ⇒ Object
Returns the value of attribute committee_ids.
7 8 9 |
# File 'app/models/effective/committee_member.rb', line 7 def committee_ids @committee_ids end |
#user_ids ⇒ Object
Returns the value of attribute user_ids.
7 8 9 |
# File 'app/models/effective/committee_member.rb', line 7 def user_ids @user_ids end |
Instance Method Details
#build_committee(attributes = {}) ⇒ Object
70 71 72 73 |
# File 'app/models/effective/committee_member.rb', line 70 def build_committee(attributes = {}) raise('please assign committee_type first') if committee_type.blank? self.committee = committee_type.constantize.new(attributes) end |
#build_user(attributes = {}) ⇒ Object
65 66 67 68 |
# File 'app/models/effective/committee_member.rb', line 65 def build_user(attributes = {}) raise('please assign user_type first') if user_type.blank? self.user = user_type.constantize.new(attributes) end |
#to_s ⇒ Object
53 54 55 |
# File 'app/models/effective/committee_member.rb', line 53 def to_s user.to_s end |