Skip to content

Commit 5edab5a

Browse files
committed
Fixed readme.
1 parent 7ed0a3b commit 5edab5a

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

README.rdoc

+19-20
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ This simple plugin gives you the ability to call to_csv to a collection of activ
1919

2020

2121
== Real life example
22-
22+
2323
In the controller where you want to export to csv, add the format.csv line (as of rails 2.1 it is not necessary to register the csv myme_type)
2424

25-
class UserController < ApplicationController
25+
class UserController < ApplicationController
2626

27-
def index
28-
@users = User.all
27+
def index
28+
@users = User.all
2929

30-
respond_to do |format|
31-
format.html
32-
format.xml { render :xml => @users }
33-
format.csv { send_data @users.to_csv }
34-
end
35-
end
30+
respond_to do |format|
31+
format.html
32+
format.xml { render :xml => @users }
33+
format.csv { send_data @users.to_csv }
34+
end
35+
end
3636

37-
def show...
38-
def new...
39-
def edit...
40-
def create...
41-
def update...
42-
def destroy...
37+
def show...
38+
def new...
39+
def edit...
40+
def create...
41+
def update...
42+
def destroy...
4343

44-
end
44+
end
4545

4646

4747
== Dependencies
4848

49-
sudo gem install fastercsv
49+
sudo gem install fastercsv
5050

5151

5252
== Install
5353

54-
./script/plugin install git://github.com/arydjmal/to_csv.git
54+
./script/plugin install git://github.com/arydjmal/to_csv.git
5555

5656

5757
== Ideas
@@ -64,5 +64,4 @@ I got ideas and influence from Mike Clarks recipe #35 in Rails Recipes book, som
6464
Does not work on a single activerecord, ie, User.first.to_csv.
6565

6666

67-
6867
Copyright (c) 2008-2010 Ary Djmal, released under the MIT license

0 commit comments

Comments
 (0)