I have a controller: "/app/controllers/analyst/test_orders_controller.rb".
In this file I have:
class Analyst::TestOrdersController < ApplicationController
def new
@order = Order.new
end
end
But I have an error:
uninitialized constant Analyst::TestOrdersController::Order
But I don't want to use Analyst::TestOrdersController::Order.new, I just want to use Order.new. It is strange. What is the problem?
Orderclass accessible fromrails console?@order = ::Order.new::Order.newactually solves your problem?