rails Creating a model instance automatically when another is created
- by bob
Hello I have a user model and a ratings model. Whenever a new user is created I want to create a new feedback model with it automatically.
Each user model has one feedback model and each feedback model has many ratings.
My Classes
class User < ActiveRecord::Base
end
class Feedback < ActiveRecord::Base
belongs_to :user
has_many…