次のメソッドをビューレイヤーで使用できるようにするにはどうすればよいですか?
# app/controllers/base_jobs_controller.rb
class BaseJobsController < ApplicationController
def self.filter_name
(controller_name.singularize + "_filter").to_sym
end
end
次のようなビューヘルパーで使用したいと思います。
module ApplicationHelper
def filter_link(text, options = {})
# Need access to filter_name in here....
end
end