Sha256: 5ec6d11f2e0dba3b67c79193430fba80ad2fa7682f5fe4ee16d5354c1a29e876

Contents?: true

Size: 532 Bytes

Versions: 8

Compression:

Stored size: 532 Bytes

Contents

class UsersController < ApplicationController
  def index
    respond_to do |format|
      format.html { render :text => 'Users!' }
      format.csv  { render :csv => User.all  }
    end
  end

  def with_custom_options
    render_options = {:csv => User.all}.update(params[:custom_options].symbolize_keys)

    respond_to do |format|
      format.csv  { render render_options }
    end
  end

  def with_custom_style
    respond_to do |format|
      format.csv  { render :csv => User.all, :style => :shortened }
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
comma-3.2.0 spec/rails_app/app/controllers/users_controller.rb
comma-3.1.1 spec/rails_app/app/controllers/users_controller.rb
comma-3.1.0 spec/rails_app/app/controllers/users_controller.rb
comma-3.0.6 spec/rails_app/app/controllers/users_controller.rb
comma-3.0.5 spec/rails_app/app/controllers/users_controller.rb
comma-3.0.4 spec/rails_app/app/controllers/users_controller.rb
comma-3.0.3 spec/rails_app/app/controllers/users_controller.rb
comma-3.0.2 spec/rails_app/app/controllers/users_controller.rb