“undefined method” when calling helper method from controller in Rails
问题 Does anyone know why I get undefined method `my_method' for #<MyController:0x1043a7410> when I call my_method("string") from within my ApplicationController subclass? My controller looks like class MyController < ApplicationController def show @value = my_method(params[:string]) end end and my helper module ApplicationHelper def my_method(string) return string end end and finally, ApplicationController class ApplicationController < ActionController::Base after_filter :set_content_type helper