Class: Arel::Table
- Inherits:
-
Object
- Object
- Arel::Table
- Defined in:
- lib/dp_publico/arel_patch.rb
Instance Method Summary collapse
Instance Method Details
#table_exists? ⇒ Boolean
3 4 5 6 7 8 |
# File 'lib/dp_publico/arel_patch.rb', line 3 def table_exists? # If we're checking the other database, assume the table always exists. return @table_exists = true if name.to_s.include?(".") # Otherwise, use the stock Arel 2.0.9 method... @table_exists ||= tables.key?(@name) || engine.connection.table_exists?(name) end |