user2012677
user2012677

Reputation: 5735

NameError (uninitialized constant Wizard)

I thought everything in the App folder autoloads. Why would I be getting an (uninitialized constant) error?

app/form_models/user.rb

module Wizard
  module User
   end
end

I have been following these instructions. https://medium.com/@nicolasblanco/developing-a-wizard-or-multi-steps-forms-in-rails-d2f3b7c692ce

However, keep getting error and the blog states: " Remember that the Rails autoloading feature will load every Ruby class inside the app folder"

Upvotes: 1

Views: 67

Answers (1)

tadman
tadman

Reputation: 211560

According to Rails auto-loader conventions this should be located in some path ending in wizard/user.rb but it's not.

One place to put it is app/models/concerns/wizard/user.rb where it can be loaded.

Upvotes: 2

Related Questions