Revision 3c4051e9
Added by Joseph Magen about 10 years ago
app/models/concerns/taxonomix.rb | ||
---|---|---|
|
||
def set_current_taxonomy
|
||
if self.new_record? && self.errors.empty?
|
||
self.id = nil #fix for rails 3.2.8 bug that sets id = 1 on after_initialize. This can later be removed.
|
||
self.locations << Location.current if add_current_location?
|
||
self.organizations << Organization.current if add_current_organization?
|
||
end
|
Also available in: Unified diff
fixes #4731 - Rails 3.2.8 causing _pkey constraint errors