README.rdoc in comma-0.4.1 vs README.rdoc in comma-0.4.2

- old
+ new

@@ -123,10 +123,14 @@ You can pass the :filename option and have Comma writes the CSV output to this file: Book.limited(10).to_comma(:filename => 'books.csv') +You also can pass the :write_header option to hide the header line (true is default): + + Book.limited(10).to_comma(:write_headers => false) + == Using blocks For more complex relationships you can pass blocks for calculated values, or related values. Following the previous example here is a comma set using blocks (both with and without labels for your CSV headings): class Publisher < ActiveRecord::Base @@ -176,9 +180,20 @@ class BooksController < ApplicationController def index respond_to do |format| format.csv { render :csv => Book.limited(50) } + end + end + + end + +You can specify which output format you would like to use by specifying a style parameter: + class BooksController < ApplicationController + + def index + respond_to do |format| + format.csv { render :csv => Book.limited(50), :style => :brief } end end end