Module: ActiveRecord::Sanitization
- Defined in:
- lib/composite_primary_keys/sanitization.rb
Instance Method Summary collapse
Instance Method Details
#quoted_id ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/composite_primary_keys/sanitization.rb', line 3 def quoted_id # CPK #quote_value(id, column_for_attribute(self.class.primary_key)) if self.composite? [self.class.primary_keys, ids]. transpose. map {|attr_name,id| quote_value(id, column_for_attribute(attr_name))} else quote_value(id, column_for_attribute(self.class.primary_key)) end end |