-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I'm having the following model:
class DistrictSection < ActiveRecord::Base belongs_to :district belongs_to :section validates_uniqueness_of :section_id, :scope => :district_id validates_presence_of :district validates_presence_of :section validate_on_create :section_waste_type_not_flagged after_create :flag_section_with_waste_type! after_destroy :unflag_section_from_waste_type!
We are having an import function which produces huge amounts of this join model items and it is important not to run migrations or hooks during import. So I tried:
DistrictSection.without_callbacks :all do converted_district_sections = ... DistrictSection.create! converted_district_sections end
But the hooks and validations are all still run. This is a Rails 2.3 application.
Metadata
Metadata
Assignees
Labels
No labels