ruby on rails - NoMethodError (undefined method `create' for nil:NilClass): while creating the new record in single table -


i new ror , trying create records in table, namely consultants using active records. getting error

nomethoderror (undefined method 'create' nil: nilclass): @ create(self.params)

class createconsultant <   struct.new(:params)   # returns newly created user   def run     consultant = tutconsultant::stores::entitystore.for(       tutconsultant::entities::consultant).create(self.params)   end end 

it seems dont have create method. should add create method in controller.

def create    //your create codes here end 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -