Sha256: 97468628cc86af2cb357e787a3926ddc386a0e06404e6ac35bef3bf04585e788
Contents?: true
Size: 388 Bytes
Versions: 3
Compression:
Stored size: 388 Bytes
Contents
class UsersController < ApplicationController def index @users = User respond_to do |format| format.html format.csv { render csv: @users, fields: [:id, :name, :age] } end end def sjis @users = User.all respond_to do |format| format.html format.csv { render csv: @users, fields: [:id, :name, :age], :encoding => 'SJIS'} end end end
Version data entries
3 entries across 3 versions & 1 rubygems