class RailsBestPractices::Prepares::RoutePrepare
Remembber routes.
Constants
- RESOURCES_ACTIONS
- RESOURCE_ACTIONS
Public Class Methods
new()
click to toggle source
# File lib/rails_best_practices/prepares/route_prepare.rb, line 13 def initialize @routes = Prepares.routes @namespaces = [] @controller_names = [] end
Public Instance Methods
current_controller_name()
click to toggle source
# File lib/rails_best_practices/prepares/route_prepare.rb, line 258 def current_controller_name @controller_names.last || @controller_name.try(:last) end
current_namespaces()
click to toggle source
# File lib/rails_best_practices/prepares/route_prepare.rb, line 254 def current_namespaces @namespaces.dup end