Sha256: 02078a152a6bac6e5b02fb2bb7dd43e4f07e007e931ccf67416f5d53f5058850
Contents?: true
Size: 651 Bytes
Versions: 16
Compression:
Stored size: 651 Bytes
Contents
module E9Crm::BaseHelper ## # Field maps # def records_table_field_map(options = {}) options.symbolize_keys! options.reverse_merge!(:class_name => resource_class.name.underscore) base_map = { :fields => { :id => nil }, :links => lambda {|r| [link_to_edit_resource(r), link_to_destroy_resource(r)] } } method_name = "records_table_field_map_for_#{options[:class_name]}" if respond_to?(method_name) base_map.merge! send(method_name) end base_map end def sortable_controller? @_sortable_controller ||= controller.class.ancestors.member?(E9Rails::Controllers::Sortable) end end
Version data entries
16 entries across 16 versions & 1 rubygems