i've stumbled @ chp 1, listing 1.8 of hartl's tutorial.
the goal place hello
action application controller.
this supposed happen:
class applicationcontroller < actioncontroller::base # prevent csrf attacks raising exception. # apis, may want use :null_session instead. protect_from_forgery with: :exception` def hello render text: "hello, world!" end end
instead, when put in first line
class applicationcontroller < actioncontroller::base
i this:
bash: actioncontroller::base: no such file or directory
what i've done:
i know application controller exists because $ ls app/controllers/*_controller.rb
returns application controller file.
other questions i've found on controllers concern topics such securitymethods haven't seen mentioned far.
i tried inputting class applicationcontroller
, told bash: class: command not found
.
q: supposed have actioncontroller::base
before taking step?
are typing class applicationcontroller < actioncontroller::base
console?
what supposed find sample_app/app/controllers/application_controller.rb , add new text inside file. save , close file.