Module: Globalize::Relation

Defined in:
lib/patches/active_record/relation.rb

Instance Method Summary collapse

Instance Method Details

#scope_for_createObject



8
9
10
11
# File 'lib/patches/active_record/relation.rb', line 8

def scope_for_create
  return super unless respond_to?(:translations_table_name)
  super.merge(where_values_hash(translations_table_name))
end

#where_values_hash(relation_table_name = table_name) ⇒ Object



3
4
5
6
# File 'lib/patches/active_record/relation.rb', line 3

def where_values_hash(relation_table_name = table_name)
  return super unless respond_to?(:translations_table_name)
  super.merge(super(translations_table_name))
end