class RailsBestPractices::Reviews::RemoveUnusedMethodsInHelpersReview
Find out unused methods in helpers.
Implementation:
Review
process:
remember all method calls in helpers. if they are not called in views, helpers, or controllers then they are unused methods in helpers.
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/rails_best_practices/reviews/remove_unused_methods_in_helpers_review.rb, line 20 def initialize(options = {}) super @helper_methods = Prepares.helper_methods self.class.interesting_files *Prepares.helpers.map(&:descendants) end
Protected Instance Methods
internal_except_methods()
click to toggle source
# File lib/rails_best_practices/reviews/remove_unused_methods_in_helpers_review.rb, line 43 def internal_except_methods ['*#url_for'] end
methods()
click to toggle source
# File lib/rails_best_practices/reviews/remove_unused_methods_in_helpers_review.rb, line 39 def methods @helper_methods end