Module: HeadRow::AssociationExtensions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/extensions/concerns/head_row/association_extensions.rb
Instance Method Summary collapse
Instance Method Details
#association(association_name, options = {}) ⇒ Object
7 8 9 10 11 12 |
# File 'app/extensions/concerns/head_row/association_extensions.rb', line 7 def association(association_name, = {}) .reverse_merge!(label_method: :name) label_method = .delete(:label_method) column(association_name, sortable_options: ["#{association_name}_#{label_method}", resource_klass.human_attribute_name(association_name)]) end |