I am trying to make a scaffold, but I want to pass the has_many attribute to the generate command as follows:
rails generate scaffold grade name:string {has_many :sections}
This generates a broken model:
class Grade < ActiveRecord::Base attr_accessible :, :name, :{has_many end
instead of what i need:
class Grade < ActiveRecord::Base attr_accessible :name has_many :sections end
How to pass a relation attribute to the generate command?
source share