Module: ActiveRecord::ModelSchema::ClassMethods
- Defined in:
- lib/rails/3.2/active_record/model_schema.rb
Instance Method Summary collapse
Instance Method Details
#columns_with_wraithdb_columns ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails/3.2/active_record/model_schema.rb', line 13 def columns_with_wraithdb_columns begin columns_without_wraithdb_columns rescue StandardError => e columns = WraithDB.schema.tables[table_name.to_s].columns return columns.map {|column| WraithDB::Column.new(column) } end end |
#table_exists_with_wraithdb_columns? ⇒ Boolean
4 5 6 7 8 9 10 |
# File 'lib/rails/3.2/active_record/model_schema.rb', line 4 def table_exists_with_wraithdb_columns? begin table_exists_without_wraithdb_columns? rescue StandardError => e WraithDB.schema.tables.has_key?(table_name.to_s) end end |