I created a Model in a ruby on rails app rails g model subject_structure name:string abbreviation:string
I created the relations
class SubjectStructure < ActiveRecord::Base
has_many :subjects
end
class Subject< ActiveRecord::Base
belongs_to:subject_structure
end
When i run the app i get the error undefined method subject_structure for #<Subject:0x9d3aa78>
Aucun commentaire:
Enregistrer un commentaire