Method: Jets::Router::Util#handle_on!

Defined in:
lib/jets/router/util.rb

#handle_on!(options) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'lib/jets/router/util.rb', line 27

def handle_on!(options)
  controller = @scope.options[:prefix].to_s
  to = "#{controller}##{options[:path]}"
  options[:to] = to

  as = @options[:on] == :member ? controller.singularize : controller
  as = "#{@options[:path]}_#{as}"
  options[:as] = as
  to.split('#')
end