lib/table_go/helpers.rb in table_go-0.1.9 vs lib/table_go/helpers.rb in table_go-0.2.0
- old
+ new
@@ -1,12 +1,14 @@
module TableGo
module Helpers
def table_go_for(collection, model_klass, options = {}, &block)
- if request && request.format.csv?
- capture { TableGo.render_csv(collection, model_klass, options, &block).html_safe }
- else
- capture { TableGo.render_html(collection, model_klass, self, options, &block) }
+ capture do
+ if request && request.format.csv?
+ TableGo.render_csv(collection, model_klass, options, &block).html_safe
+ else
+ TableGo.render_html(collection, model_klass, self, options, &block)
+ end
end
end
end
end