Displaying 1 result from an estimated 1 matches for "create_shop".
2012 Aug 17
3
Rails doesn't validate create_model or build_model (has_one association)
I''ve got User has_one Shop. Rails is not validating when I tried
create_shop or build_shop, neither in the browser nor the rails console.
My code:
class Shop < ActiveRecord::Base
  attr_protected :user_id
  belongs_to :user
  validates_presence_of :name, :primary_address, :city, :country_code,
:currency
end
class ShopsController < ApplicationController
  before_fil...