README.md in tableview-0.1.0 vs README.md in tableview-0.2.0
- old
+ new
@@ -9,11 +9,11 @@
In your Gemfile:
- gem 'tablevie'
+ gem 'tableview'
then
$ bundle install
@@ -39,6 +39,19 @@
@posts.each do |post|
table.row do |row|
row.cell post.title
row.cell post.body if format.xls?
end
- end
\ No newline at end of file
+ end
+
+This partial will be used to render your view.
+
+### NEW! ###
+
+We now have a column based DSL.
+
+ table.table_for @events
+
+ # uses I18n for header and calls the symbol as a method on the object
+ table.columns :first_name, :last_name
+ # Uses first arg as header, and evaluates block for each row
+ table.column("E-mail address") {|event| format.html? link_to event.email : event.email }