ruby on rails - Load Error with Hierarchy / Module -
ruby on rails - Load Error with Hierarchy / Module -
i have directory construction looks this:
\- app \- models \- services \- recommended_action |- base.rb |- other_recommended_action.rb |- random_service.rb
in application.rb, i'm autoloading recommended_action directory via
config.autoload_paths += %w( #{config.root}/app/services/recommended_action )
my base.rb
file looks this:
module recommendedaction class base of operations def initialize(attributes = {}) # assign attributes end end end
however, whenever seek load rails console, i'm getting next error:
unable autoload constant base, expected /users/justin/project/app/services/recommended_action/base.rb define (loaderror)
what missing?
ruby-on-rails ruby
Comments
Post a Comment