mongodb - Rails 4 - Uninitialized constant Mongo Model -
I am trying to setup MongoHQ using Harko and Rail 4. 4. I have set up everything correctly to my knowledge, but now I'm getting this error:
This is the And I Mongo models: p> It seems that my Mongo model is not being started, and the namespace seems strange to me. Any idea as to the cause of this error and the way to fix it? include rail automatically to load class file rail load path (which app / models , So you should be right there) and the name of the file should be the heat version of the class name. should be the name of the file in your case undefined constant jobs :: TempEmailContactStoreCsv
Job model where the error is happening:
Classes in TempEmailContactStoreCsv Mongoid :: Document field: email_contact_array, Type: Array field: job_id def self. store (job_id, email_contact_array) r = TempEmailContactStoreCsv.find_by (job_id: job_id) that (rnn?) TempEmailContactStoreCsv.create! (Job_id: job_id, email_contact_array: email_contact_array) End end def self.exists? (Job_id) r = TempEmailContactStoreCsv.find_by (job_id: job_id) Returns RNL? == wrong end Diif self.retrieve (job_id) return TempEmailContactStoreCsv.find_by (job_id: job_id) end Diif self.delete (job_id) r = TempEmailContactStoreCsv.find_by (job_id: job_id) r.destroy until r.nil? End end
temp_email_contact_store_csv.rb not
temp_email_store_csv.rb
Comments
Post a Comment