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
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/fat_free_crm/exportable.rb', line 29 def self.included(base) if base.instance_methods.include?(:assignee) || base.instance_methods.include?('assignee') define_method :assigned_to_full_name do user = assignee user ? user.full_name : '' end end if base.instance_methods.include?(:completor) || base.instance_methods.include?('completor') define_method :completed_by_full_name do user = completor user ? user.full_name : '' end end end |
Instance Method Details
#user_id_full_name ⇒ Object
24 25 26 27 |
# File 'lib/fat_free_crm/exportable.rb', line 24 def user_id_full_name user = self.user user ? user.full_name : '' end |