diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 10:38:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-30 10:38:54 -0700 |
commit | 04b3f0611c69532526d8b16799a7625b92dcf1fc (patch) | |
tree | 18a0a13b433fb95016fcaf03cbca55405d068d99 /spec/support | |
parent | a672a525f821aed061c2aa68ec804e895ac3ebf3 (diff) | |
download | rails-04b3f0611c69532526d8b16799a7625b92dcf1fc.tar.gz rails-04b3f0611c69532526d8b16799a7625b92dcf1fc.tar.bz2 rails-04b3f0611c69532526d8b16799a7625b92dcf1fc.zip |
PERF: removing def engine
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/model.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/support/model.rb b/spec/support/model.rb index d5be35cbba..969af83cc6 100644 --- a/spec/support/model.rb +++ b/spec/support/model.rb @@ -1,6 +1,6 @@ module Arel module Testing - class Engine + class Engine < Arel::Memory::Engine attr_reader :rows def initialize @@ -12,7 +12,12 @@ module Arel end def read(relation) - @rows.dup.map { |r| Row.new(relation, r) } + case relation + when Arel::Take + relation.eval + else + @rows.dup.map { |r| Row.new(relation, r) } + end end def create(insert) |