class ActionDispatch::Routing::Mapper

Public Instance Methods

morphing_for(options = {}) click to toggle source
# File lib/morphing/rails/routes.rb, line 3
def morphing_for(options = {})
  controller_name = options[:controller] || 'morphing/morphing'

  get '/morph/:id'    => "#{controller_name}#morph", as: :morph
  get '/unmorph'      => "#{controller_name}#unmorph", as: :unmorph
end