Class: WhereLower::ScopeSpawner::HashScopeSpawner
- Inherits:
-
BasicScopeSpawner
- Object
- WhereLower::ScopeSpawner
- BasicScopeSpawner
- WhereLower::ScopeSpawner::HashScopeSpawner
- Defined in:
- lib/where_lower/scope_spawner.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from WhereLower::ScopeSpawner
#column_or_table_name, #prefix, #scope, #value
Instance Method Summary collapse
-
#spawn ⇒ Object
If prefix already exists, that means we are in association table already, which cannot accept another hash This gem has no ability to handle deep nested associaiton reflection yet.
Methods inherited from WhereLower::ScopeSpawner
Constructor Details
This class inherits a constructor from WhereLower::ScopeSpawner
Instance Method Details
#spawn ⇒ Object
If prefix already exists, that means we are in association table already, which cannot accept another hash This gem has no ability to handle deep nested associaiton reflection yet
126 127 128 129 130 131 132 |
# File 'lib/where_lower/scope_spawner.rb', line 126 def spawn fail TooDeepNestedConditions unless prefix.nil? value.inject(scope) do |new_scope, (column_name, column_value)| ScopeSpawner.spawn(new_scope, column_name, column_value, column_or_table_name) end end |