R
ritchie
hi there
I'm trying to use helpers in my controller, but they're not turning up.
NoMethodError in Switcher#index
undefined method `create_menu' for SwitcherController:Class
app/controllers/switcher_controller.rb:7:in `index'
script/server:48
I'm doing this at the top of my class
class SwitcherController < ApplicationController
helper :switcher
....
end
and the helper switcher_helper.rb exists in the helper dir
module SwitcherHelper
def create_menu(dir)
$menu = {}
menu_level(dir)
end
....
end
thanks for showing me the error of my ways ... also it is loading
switcher_helper.rb, cos if I add an exit at the top of the file it lets
me know.
ritchie
I'm trying to use helpers in my controller, but they're not turning up.
NoMethodError in Switcher#index
undefined method `create_menu' for SwitcherController:Class
app/controllers/switcher_controller.rb:7:in `index'
script/server:48
I'm doing this at the top of my class
class SwitcherController < ApplicationController
helper :switcher
....
end
and the helper switcher_helper.rb exists in the helper dir
module SwitcherHelper
def create_menu(dir)
$menu = {}
menu_level(dir)
end
....
end
thanks for showing me the error of my ways ... also it is loading
switcher_helper.rb, cos if I add an exit at the top of the file it lets
me know.
ritchie