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
Post a Comment