I’m facing a common problem that novices face with Rails 3.2.3. I am getting error
Can’t mass-assign protected attributes: user_impl, util_location
class User < ActiveRecord::Base
has_one :user_impl, :dependent => :destroy
has_one :util_location, :as => :locatable, :dependent => :destroy
attr_accessible ..., :user_impl_attributes, :util_location_attributes
I tried adding accepts_nested_attributes_for :user_impl, :util_location to the code too but that too is not working and giving an altogether different error.
the basic structure should be as follow: