Module: Globalize::Relation

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

Instance Method Summary collapse

Instance Method Details

#scope_for_createObject



10
11
12
13
# File 'lib/patches/active_record/relation.rb', line 10

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



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

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