lib/generators/templates/table.rb in table_cloth-0.3.1.alpha1 vs lib/generators/templates/table.rb in table_cloth-0.3.2

- old
+ new

@@ -11,11 +11,11 @@ # object.downcase # end # # Columns can also have conditionals if you want. # The conditions are checked against the table's methods. - # As a convience, the table has a #view method which will return the current view context. + # As a convenience, the table has a #view method which will return the current view context. # This gives you access to current user, params, etc... # # column :email, if: :admin? # # def admin? @@ -29,8 +29,8 @@ # # actions do # action {|object| link_to "Edit", edit_object_path(object) } # action(if: :valid?) {|object| link_to "Invalidate", invalidate_object_path(object) } # end - # + # # If action provides an "if:" option, it will call that method on the object. It can also take a block with an arity of 1. end