Class: ActiveScaffold::Tableless::StatementCache

Inherits:
Object
  • Object
show all
Defined in:
lib/active_scaffold/tableless.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, model = nil) ⇒ StatementCache

Returns a new instance of StatementCache.



171
172
173
174
# File 'lib/active_scaffold/tableless.rb', line 171

def initialize(key, model = nil)
  @key = key
  @model = model
end

Instance Method Details

#execute(values, connection) ⇒ Object



176
177
178
# File 'lib/active_scaffold/tableless.rb', line 176

def execute(values, connection)
  @model.where(@key => values)
end