I'm learning Rails course by Michael Hartl, on chapter 4, I have function full_title as following:
app/helpers/application_helper.rb
module ApplicationHelper
def full_title page_title = ""
base_title = t "app_name"
page_title.empty? ? base_title : page_title + " | " + base_title
end
end
Runing reek (a code review tool), I got a warning:
app/helpers/application_helper.rb -- 1 warning:
[4, 4]:FeatureEnvy: ApplicationHelper#full_title refers to 'page_title' more than self (maybe move it to another class?) [https://github.com/troessner/reek/blob/master/docs/Feature-Envy.md]
So what is FeatureEnvy and how to fix it in this case?