app/views/application/index.pdf.haml in rich_table_component-0.0.5 vs app/views/application/index.pdf.haml in rich_table_component-0.0.6
- old
+ new
@@ -6,16 +6,15 @@
%h2= "Tabel " + t(rtc_controller_name.classify.underscore)
%table{:border => "0", :cellpadding => "0", :cellspacing => "0"}
%tr
- puts params[:export_attribute_ids]
- params[:export_attribute_ids].each do |att|
- - attribute = att.to_s
%th
- .cell= t((attribute.split('.').last(2) - ['to_s']).join('_').presence || @rtc_controller_name.klass.name.underscore)
+ .cell= att.split(';').first
- @rtc_controller_name.each do |rtc|
%tr
- params[:export_attribute_ids].each do |att|
- - attribute = att.to_s
+ - attribute = att.split(';').last
- splitter = attribute.split('.')
- splitter.unshift(rtc)
- val = splitter.inject do |ret, n|
- if ret.respond_to? :collect
- ret.collect(&(n.to_sym))