Module: ActiveType::NoTable::ClassMethods

Defined in:
lib/active_type/no_table.rb

Instance Method Summary collapse

Instance Method Details

#_query_by_sqlObject



73
74
75
# File 'lib/active_type/no_table.rb', line 73

def _query_by_sql(*)
  []
end

#cached_find_byObject



77
78
79
# File 'lib/active_type/no_table.rb', line 77

def cached_find_by(*)
  nil
end

#connectionObject



53
54
55
# File 'lib/active_type/no_table.rb', line 53

def connection
  @connection ||= DummyConnection.new(nil)
end

#destroyObject



61
62
63
# File 'lib/active_type/no_table.rb', line 61

def destroy(*)
  new
end

#destroy_allObject



65
66
67
# File 'lib/active_type/no_table.rb', line 65

def destroy_all(*)
  []
end

#find_by_sqlObject



69
70
71
# File 'lib/active_type/no_table.rb', line 69

def find_by_sql(*)
  []
end

#schema_cacheObject



81
82
83
# File 'lib/active_type/no_table.rb', line 81

def schema_cache
  DummySchemaCache.new
end

#with_connection {|connection| ... } ⇒ Object

Yields:



57
58
59
# File 'lib/active_type/no_table.rb', line 57

def with_connection(**)
  yield(connection)
end