spec/support/model_helpers.rb in warp-1.2.0 vs spec/support/model_helpers.rb in warp-1.2.1
- old
+ new
@@ -12,9 +12,13 @@
def self.columns
@columns ||= []
end
+ def self.attribute_names
+ @columns.map(&:name)
+ end
+
def self.attribute_method?(method)
method = method.to_s.sub("=", "")
columns.any? {|c| c.name == method }
end
\ No newline at end of file