Class: ActiveScaffold::Tableless::StatementCache
- Defined in:
- lib/active_scaffold/tableless.rb
Instance Method Summary collapse
- #execute(values, connection) ⇒ Object
-
#initialize(key, model = nil) ⇒ StatementCache
constructor
A new instance of StatementCache.
Constructor Details
#initialize(key, model = nil) ⇒ StatementCache
Returns a new instance of StatementCache.
205 206 207 208 |
# File 'lib/active_scaffold/tableless.rb', line 205 def initialize(key, model = nil) @key = key @model = model end |
Instance Method Details
#execute(values, connection) ⇒ Object
211 212 213 |
# File 'lib/active_scaffold/tableless.rb', line 211 def execute(values, model, connection) model.where(@key => values) end |