Module: FatFreeCRM::Exportable::InstanceMethods
- Defined in:
- lib/fat_free_crm/exportable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fat_free_crm/exportable.rb', line 28 def self.included(base) if base.instance_methods.include?(:assignee) or base.instance_methods.include?('assignee') define_method :assigned_to_full_name do user = self.assignee user ? user.full_name : '' end end if base.instance_methods.include?(:completor) or base.instance_methods.include?('completor') define_method :completed_by_full_name do user = self.completor user ? user.full_name : '' end end end |
Instance Method Details
#user_id_full_name ⇒ Object
23 24 25 26 |
# File 'lib/fat_free_crm/exportable.rb', line 23 def user_id_full_name user = self.user user ? user.full_name : '' end |