Reputation: 16197
Given the custom helper file in app/helpers/url_helper.rb
module UrlHelper
...
end
How do I make it accessible in all controllers and in all views?
Upvotes: 7
Views: 3873
Reputation: 16284
Or... include them into your controller
class ApplicationController < ActionController::Base
include UrlHelper
end
Upvotes: 12
Reputation: 1725
Place it in ApplicationController (not a helper) and declare helper_method :method_name
.
Upvotes: 7