Class: ActiveScaffold::Tableless::StatementCache

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

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ StatementCache

Returns a new instance of StatementCache.



141
142
143
# File 'lib/active_scaffold/tableless.rb', line 141

def initialize(key)
  @key = key
end

Instance Method Details

#execute(values, model, connection) ⇒ Object



145
146
147
# File 'lib/active_scaffold/tableless.rb', line 145

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