README.rdoc in to_xls-1.5.0 vs README.rdoc in to_xls-1.5.1

- old
+ new

@@ -1,13 +1,15 @@ = to_xls gem -This gem transform an Array or Hash into a excel file using the spreadsheet gem. +This gem transform an Enumeration (i.e. an Array) into an excel file using the spreadsheet gem. +It is (very slightly) oriented towards exporting ActiveRecord sets, but it can be used outside of Rails as well. + == Usage @users = User.all - @users.to_xls + @users.to_xls # by default, it exports using the "attributes" field on the first item of the collection @users.to_xls(:name => "Users") # specifies the Sheet name (by default Sheet1) @users.to_xls(:headers => false) # don't include headers @users.to_xls(:columns => [:name, :role]) # include only these columns, on this order @users.to_xls(:columns => [:name, {:company => [:name, :address]}]) # able to pick associations/called methods @users.to_xls(:columns => [:name, {:company => [:name, :address]}], :headers => ['Name', 'Company', 'Address']) # provide better names for the associated columns