ruby on rails - Active Admin Exporting to CSV file -


i'm using active admin use admin functionalities in rails 4.0 application. have users table lists

  • id
  • name
  • email
  • phone no

i have put button on top of list this.

action_item only: :index   link_to 'export csv', '#' end 

i want export users id name & email csv file when click on button. please me this

just add section inside admin

csv   column :id   column :name   column :email end 

check active admin customize csv

if open link, see line

column(:author) { |post| post.author.full_name } 

it adds authors name post csv file, way can add field want


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -