I recently came across a tricky situation related to rails view helpers.
The situation is like follows-
I am having a controller as
Feature1::Feature1.1::Feature1.1.1Controller
Feature1.1
Feature1.1.2Controller
Feature1.1.3Controller
app/helpers/feature1/feature1.1/...
feature1.1
method1
method1
feature1.1.1
method1
feature1.1.2
feature1/feature1.1/feature1.1.1/index
method1
rails3
I did some research and would like to share some additional info.
As per @slowjack2k mentioned, view helpers are included by rails as a default behavior.
But my question was about the situation of same method names across multiple helpers.
I found this article to be useful in this scenario. Though it explains the behavior for Rails 4
but I found it behaves in the same fashion for Rails 3.2.2
.
I will summarize the article -
If there will be any conflict in the same names of methods in different helper modules, rails will use method from latter file (alphabetically)