How to Make CSV Format Report of User Information using Active Scaffold in Rails 2.3.8
I am New Ruby on Rails. I want to export CSV File for User Information which is having user controller.
Ruby version: 1.8.7 Rails version: 2.3.8
Example:
I have user controller:
class Admin::UserController < ApplicationController
active_scaffold :users do |config|
config.list.sorting = {:name => :asc}
conf开发者_JAVA百科ig.columns[:name].form_ui=:text_input
config.columns[:name].inplace_edit=true
config.columns[:email].form_ui=:text_input
config.columns[:email].inplace_edit=true
config.columns[:phone].form_ui=:text_input
config.columns[:phone].inplace_edi=true
end
end
Model: user
class User < ActiveRecord::Base
end
I want to export file as CSV the above details which having my user controller. is this any requirement for doing this? please anybody can guide me.
You're looking for the ActiveScaffold Export plugin:
http://code.google.com/p/activescaffoldexport/wiki/Features
https://github.com/ewildgoose/active_scaffold_export
精彩评论