I have a controller, I want to create a helper for this controller that I can use without including it. I tried creating a helper with the same name as the controller like so
class Cars::EnginesController < ApplicationController
def start_engine
check_fuel
end
end
and the helper that i created was
module Cars::EnginesHelper
def check_fuel
logger.debug("cheking fuel")
end
end
and the error that i got was
undefined local variable or method `check_fuel' for #<Cars::EnginesController:0x1160e8c80>
is there any conventions that i am missing out?