aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-07-28 22:25:03 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-07-28 22:25:03 -0300
commit06dbb824b9a1e431914ec18c42e6586e49714e97 (patch)
tree512ddceadd98a3c84836170d44d33ab0bc5d3d68 /lib
parentccbf1e4b7cb29780b9411ecb2bee97be004ae8dc (diff)
downloadrails-06dbb824b9a1e431914ec18c42e6586e49714e97.tar.gz
rails-06dbb824b9a1e431914ec18c42e6586e49714e97.tar.bz2
rails-06dbb824b9a1e431914ec18c42e6586e49714e97.zip
if-else logic doesn't needed
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/engines/sql/relations/table.rb6
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