Module: Globalize::ActiveRecord::QueryMethods
- Defined in:
- lib/globalize/active_record/query_methods.rb
Instance Method Summary collapse
Instance Method Details
#where_values_hash ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/globalize/active_record/query_methods.rb', line 4 def where_values_hash equalities = with_default_scope.where_values.grep(Arel::Nodes::Equality).find_all { |node| node.left.relation.name == translations_table_name } super.merge(Hash[equalities.map { |where| [where.left.name, where.right] }]).with_indifferent_access end |