Module: ActiveType::NoTable::ClassMethods
- Defined in:
- lib/active_type/no_table.rb
Instance Method Summary collapse
- #_query_by_sql ⇒ Object
- #cached_find_by ⇒ Object
- #connection ⇒ Object
- #destroy ⇒ Object
- #destroy_all ⇒ Object
- #find_by_sql ⇒ Object
- #schema_cache ⇒ Object
- #with_connection {|connection| ... } ⇒ Object
Instance Method Details
#_query_by_sql ⇒ Object
73 74 75 |
# File 'lib/active_type/no_table.rb', line 73 def _query_by_sql(*) [] end |
#cached_find_by ⇒ Object
77 78 79 |
# File 'lib/active_type/no_table.rb', line 77 def cached_find_by(*) nil end |
#connection ⇒ Object
53 54 55 |
# File 'lib/active_type/no_table.rb', line 53 def connection @connection ||= DummyConnection.new(nil) end |
#destroy ⇒ Object
61 62 63 |
# File 'lib/active_type/no_table.rb', line 61 def destroy(*) new end |
#destroy_all ⇒ Object
65 66 67 |
# File 'lib/active_type/no_table.rb', line 65 def destroy_all(*) [] end |
#find_by_sql ⇒ Object
69 70 71 |
# File 'lib/active_type/no_table.rb', line 69 def find_by_sql(*) [] end |
#schema_cache ⇒ Object
81 82 83 |
# File 'lib/active_type/no_table.rb', line 81 def schema_cache DummySchemaCache.new end |
#with_connection {|connection| ... } ⇒ Object
57 58 59 |
# File 'lib/active_type/no_table.rb', line 57 def with_connection(**) yield(connection) end |