7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/helpers/e9_crm/base_helper.rb', line 7
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
|