diff options
author | Carl Lerche <carllerche@mac.com> | 2010-04-02 19:04:23 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-04-02 19:04:23 -0700 |
commit | a46922e4a1089c9880c30b389e1e1d9dfbab02ae (patch) | |
tree | 2115e291ff1799d662bbb445b96060f2d029cc0d /spec/support/model.rb | |
parent | 233ee77f4511255ff2ff7c0b0ebf1cee13e7fc10 (diff) | |
download | rails-a46922e4a1089c9880c30b389e1e1d9dfbab02ae.tar.gz rails-a46922e4a1089c9880c30b389e1e1d9dfbab02ae.tar.bz2 rails-a46922e4a1089c9880c30b389e1e1d9dfbab02ae.zip |
Create an Arel::Header class representing a relation's attributes
Diffstat (limited to 'spec/support/model.rb')
-rw-r--r-- | spec/support/model.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/model.rb b/spec/support/model.rb index 10a14d7092..be692e53ec 100644 --- a/spec/support/model.rb +++ b/spec/support/model.rb @@ -25,7 +25,7 @@ module Arel class Model include Relation - attr_reader :engine, :attributes + attr_reader :engine def self.build relation = new @@ -46,6 +46,10 @@ module Arel @attributes << type.new(self, name) end + def attributes + Header.new(@attributes) + end + def format(attribute, value) value end |