I installed the comma gem today and everything worked perfectly, but the actual .csv file is empty except for the first cell, which reads:
#<Proc:0x2795700@C:/Ruby192/lib/ruby/gems/1.9.1/gems/comma-0.4.1/lib/comma/render_as_csv.rb:35>
I'm calling comma with this in my controller:
def index
@registrants = @rsvp.rsvp_registrants
respond_to do |format|
format.html
format.csv { render :csv => @registrants }
end
end
And keeping it simple in my model for now:
comma do
email
end
I have tried various other queries, including ones that only return one record, just for troubleshooting purposes. Also installed fasterCSV just now in case it was a dependency.
I'm on Rails 3, Ruby 1.9.2, developing on a Windows XP machine.
Any help is appreciated. Thanks!