Class: Effective::Representative
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::Representative
- Defined in:
- app/models/effective/representative.rb
Instance Attribute Summary collapse
-
#new_representative_user_action ⇒ Object
Returns the value of attribute new_representative_user_action.
Instance Method Summary collapse
Instance Attribute Details
#new_representative_user_action ⇒ Object
Returns the value of attribute new_representative_user_action.
5 6 7 |
# File 'app/models/effective/representative.rb', line 5 def new_representative_user_action @new_representative_user_action end |
Instance Method Details
#build_organization(attributes = {}) ⇒ Object
50 51 52 53 |
# File 'app/models/effective/representative.rb', line 50 def build_organization(attributes = {}) raise('please assign organization_type first') if organization_type.blank? self.organization = organization_type.constantize.new(attributes) end |
#build_user(attributes = {}) ⇒ Object
45 46 47 48 |
# File 'app/models/effective/representative.rb', line 45 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
41 42 43 |
# File 'app/models/effective/representative.rb', line 41 def to_s user.to_s end |