Module: RenderAsCSV::InstanceMethods
- Defined in:
- lib/comma.rb
Instance Method Summary collapse
Instance Method Details
#render_with_csv(options = nil, extra_options = {}, &block) ⇒ Object
44 45 46 47 |
# File 'lib/comma.rb', line 44 def render_with_csv( = nil, = {}, &block) return render_without_csv(, , &block) unless (.respond_to? '[]') and [:csv] send_data Array([:csv]).to_comma([:style] ||= :default), :filename => "test.csv" end |