From 82cd4a919b01d120798faa919d8b6feebae5554f Mon Sep 17 00:00:00 2001 From: Ary Djmal Date: Tue, 29 Jul 2008 20:04:26 -0400 Subject: [PATCH] modified readme file explaining new feature --- README.rdoc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index e80a23e..9ca2e50 100644 --- a/README.rdoc +++ b/README.rdoc @@ -16,7 +16,17 @@ This simple plugin gives you the ability to call to_csv to a collection of activ @users.to_csv(:timestamps => true, :id => true, :header => false) @users.to_csv(:except => [:last_name, :role]) @users.to_csv(:except => :role, :methods => [:name, :admin?]) - + + # + # NEW FEATURE + # Now you can call methods of a has_one or belongs_to association + # (for now you can go up/down 1 level) + # + (A note belongs_to :user) + @notes = Note.all + @notes.to_csv(:methods => [{:user => :name}]) + + == Real life example