title: Create_association doesn't work after upgrade to Rails 4
body: <p>We upgrade Rails 3.2 app to Rails 4 and we have some problems. I have model Account and AccounSettings:</p>
  
  <pre><code>class Account &lt; ActiveRecord::Base
  
    # ...
    after_commit :create_default_settings, on: :create
  
    # associations
    has_one :feature_flags, class_name: "FeatureFlag"
    has_one :qb_settings, class_name: "QbSetting"
    has_one :settings, class_name: "AccountSetting"
    has_one :pos_settings, class_name: "PosSetting"
    # ...
  
    def create_default_settings
      self.create_settings
      self.create_feature_flags(qb_enabled: false, qb_online_enabled: false)
      self.create_default_taxes
      self.create_qb_settings(tz: self.tz)
      self.create_pos_settings(default_tax_id: SalesTax.where(account_id: self.id).first.id)
      self.qb_settings.set_qb_sync_attributes_with_date(Time.zone.now)
    end
  
    def create_default_taxes
      sales_tax = SalesTax.create!(name: "State", description: "State Tax", tax_rate: 0.085, tax_agency: "Franchise Tax Board", account_id: self.id) 
    end
  
    # ...
  end
  
  
  class PosSetting &lt; ActiveRecord::Base
    # ...
  
    belongs_to :account
  
    belongs_to :default_tax, class_name: "SalesTax"
    belongs_to :default_term_code, class_name: "TermCode"
  
    belongs_to :default_sales_rep, class_name: 'User'
  
    belongs_to :payment_gateway
  
    def is_metric?
      measurement_system == 'metric'
    end
  
    enumerize :measurement_system, in: %w(english metric), default: 'english'
    enumerize :accounting_method, in: %w(accrual cash), default: 'cash'
  
  end
  </code></pre>
  
  <p>When I created account </p>
  
  <blockquote>
    <p>account = Account.create!(name: 'Test Account', ...)</p>
  </blockquote>
  
  <p>like I did in rails 3 before. I got error with missing account_id in AccountSetting (line: self.create_settings). So I have to change all lines with </p>
  
  <blockquote>
    <p>self.create_settings</p>
  </blockquote>
  
  <p>to </p>
  
  <blockquote>
    <p>self.build_settings.save</p>
  </blockquote>
  
  <p>. And after I have to reload account everytime when I can use account.settings, because if I don't reload account, I have account.settings without account_id. I don't understand where is the problem and I have same problem with FactoryGirl in test env. It's same problem with all associations (feature_flags, qb_settings,...). </p>