Helpers in Rails 4
helper, ruby-on-rails-4
Solution
Because all helpers are included in all controllers, by default. The separate files are really just for logical separation in this scenario. You can change that behaviour though:
By default, each controller will include all helpers.
In previous versions of Rails the controller will include a helper whose name matches that of the controller, e.g., MyController will automatically include MyHelper. To return old behavior set `config.action_controller.include_all_helpers` to `false`.
http://api.rubyonrails.org/classes/ActionController/Helpers.html
Problem
I make an application writed in Rails, it's growing fast and I learning with it. But I'm don't understand about helpers. application_helper.rb ``` module ApplicationHelper # This file it's empty end ``` users_helper.rb ``` module UsersHelper def avatar # Do something end end ``` customer_helper.rb ``` module CustomerHelper # This file it's empty end ``` Why in any customer's view can call avatar helper method on user helper module? Then, why separate helpers in many files? Thanks in advance. P.S: Rails' version 4.