diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-28 22:25:03 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-28 22:25:03 -0300 |
commit | 06dbb824b9a1e431914ec18c42e6586e49714e97 (patch) | |
tree | 512ddceadd98a3c84836170d44d33ab0bc5d3d68 /lib/arel/engines/sql/relations/table.rb | |
parent | ccbf1e4b7cb29780b9411ecb2bee97be004ae8dc (diff) | |
download | rails-06dbb824b9a1e431914ec18c42e6586e49714e97.tar.gz rails-06dbb824b9a1e431914ec18c42e6586e49714e97.tar.bz2 rails-06dbb824b9a1e431914ec18c42e6586e49714e97.zip |
if-else logic doesn't needed
Diffstat (limited to 'lib/arel/engines/sql/relations/table.rb')
-rw-r--r-- | lib/arel/engines/sql/relations/table.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb index 28c56a6bb0..65a0f91e8c 100644 --- a/lib/arel/engines/sql/relations/table.rb +++ b/lib/arel/engines/sql/relations/table.rb @@ -52,11 +52,7 @@ module Arel end def table_exists? - if @table_exists - true - else - @table_exists = @@tables.include?(name) || engine.connection.table_exists?(name) - end + @table_exists ||= @@tables.include?(name) || engine.connection.table_exists?(name) end def attributes |