Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_routing.rb

Instance Method Summary collapse

Instance Method Details

#actions_for(controller_action_pairs) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/easy_routing.rb', line 4

def actions_for(controller_action_pairs)
  controller_action_pairs.each do |controller, actions|
    actions.each do |action_string|
      action = action_string.split(/\W/).first
      match action_string => "#{controller}##{action}", :as => action
    end
  end
end