spec/support/model_helpers.rb in warp-1.1.0 vs spec/support/model_helpers.rb in warp-1.2.0

- old
+ new

@@ -12,9 +12,14 @@ def self.columns @columns ||= [] end + def self.attribute_method?(method) + method = method.to_s.sub("=", "") + columns.any? {|c| c.name == method } + end + def self.column(name, sql_type = nil, default = nil, null = true) columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) end instance_eval(&blk) \ No newline at end of file