README.md in spreadsheet_architect-1.2.3 vs README.md in spreadsheet_architect-1.2.4
- old
+ new
@@ -38,15 +38,18 @@
has_many :tags
#optional for activerecord classes, defaults to the models column_names
def spreadsheet_columns
- #[[Label, Method/Statement to Call on each Instance]....]
+ #[[Label, Method/Statement to Call on each Instance, Cell Type(optional)]....]
[
['Title', :title],
['Content', content],
['Author', (author.name rescue nil)],
['Published?', (published ? 'Yes' : 'No')],
+ ['Published At', :published_at],
+ ['# of Views', :number_of_views],
+ ['Rating', :rating],
['Category/Tags', "#{category.name} - #{tags.collect(&:name).join(', ')}"]
]
# OR just humanize the method to use as the label ex. "Title", "Content", "Author Name", "Published"
[:title, content, (author.name rescue nil), :published]