Can anyone suggest me how I can define a custom model name. When I tried to generate a model with name 3AForm it’s raising a error.
rails g model 3A_Form date_of_investigation:date date_of_transcription:date by:string investigator:string type_of_investigative_activity:text results_of_investigation:text
That’s not going to work,
3A_Formis not a valid class name in Ruby. Perhaps you should tryrails g model Form3A ...instead. If you need to connect your model to an existing table with a strange name then you can usetable_namein your class: