Module: Commontator::ThreadsHelper
- Included in:
- SubscriptionsMailer
- Defined in:
- app/helpers/commontator/threads_helper.rb
Instance Method Summary collapse
Instance Method Details
#closer_name(thread) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/helpers/commontator/threads_helper.rb', line 14 def closer_name(thread) closer = thread.closer return Commontator.commontator_missing_name if closer.nil? config = closer.commontator_config config.commontator_name_method.blank? ? config.commontator_missing_name : \ closer.send(config.commontator_name_method) end |
#commontable_id(thread) ⇒ Object
10 11 12 |
# File 'app/helpers/commontator/threads_helper.rb', line 10 def commontable_id(thread) thread.commontable.send(thread.config.commontable_id_method) end |
#commontable_name(thread) ⇒ Object
3 4 5 6 7 8 |
# File 'app/helpers/commontator/threads_helper.rb', line 3 def commontable_name(thread) config = thread.config config.commontable_name.blank? ? \ thread.commontable.class.name : \ config.commontable_name end |