Permalink
Browse files

Don't instance_eval block

  • Loading branch information...
1 parent c3f2a52 commit fd10169ad680f648f44b766a2abfc54771511e13 Joe Fiorini committed Jan 16, 2010
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/totally_tabular/table_view.rb
  2. +2 −2 spec/lib/totally_tabular/table_view_spec.rb
@@ -15,7 +15,7 @@ def initialize(collection, options={}, &block)
def render
table = Table.new
- table.instance_eval(&@column_definition)
+ @column_definition.call(table)
headers = if @collection.empty?
""
else
@@ -105,8 +105,8 @@ def selector(string, selector)
end
it "allows defining class on header" do
- t = TableView.new([1]) do
- column("Blah", :class => "blahdiddy") do |column|
+ t = TableView.new([1]) do |table|
+ table.column("Blah", :class => "blahdiddy") do |column|
column.template! do |o, row|
end
end

0 comments on commit fd10169

Please sign in to comment.