Load constant

0

I'm having trouble for instance the Report model.

Console:

LoadError (Unable to autoload constant Report_questao, expected app/models/report.rb to define it):
  app/controllers/pessoas_controller.rb:49:in 'reportar'

controller:

require 'report'

class QuestoesController < ApplicationController
def reportar
    @report = report.new
  end
end

Model:

report.rb

class Report < ActiveRecord::Base

  belongs_to :pessoa

end
    
asked by anonymous 21.11.2016 / 10:30

1 answer

0

The stupid error was in:

questao.new 

instead of

Questao.new

Thank you Marco Vinicius

    
21.11.2016 / 12:46