/lib にモジュールがあります
Module Info
class Inf
def getNum
num = Array.new
num.push(2,1)
end
end
コントローラーの informations_controller には、「require Info」と次のコードがあります。
def index
@informations = Info::Inf.getNum().num
respond_to do |format|
format.html # index.html.erb
format.json { render json: @informations }
end
end
しかし、それは常にエラーを与えます
Routing Error
uninitialized constant Info
ルーターで "root :to => 'informations#index'" を定義したので、何が不足している可能性がありますか?