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