I have two models linked together with a belongs_to and a has_one association, but I can add more than one record to the database since I have generated that model through scaffold generation. My code looks like the following:
class User < ActiveRecord::Base
has_one :setting, dependent: :destroy
class Setting < ActiveRecord::Base
belongs_to :user
I can create multiple settings for each individual user. I was under the impression that by adding this association to the model, that rails would disallow the ability to create more than one record. Since I have run scaffold generation I have a standard restful controller, would there be something I need to change or update in my model other than the code I have specified above?