lib/authpwn_rails/routes.rb in authpwn_rails-0.13.4 vs lib/authpwn_rails/routes.rb in authpwn_rails-0.14.0
- old
+ new
@@ -20,27 +20,27 @@
def authpwn_session(options = {})
controller = options[:controller] || 'session'
paths = options[:paths] || controller
methods = options[:method_names] || 'session'
- get "/#{paths}/token/:code", :controller => controller, :action => 'token',
- :as => :"token_#{methods}"
+ get "/#{paths}/token/:code", controller: controller, action: 'token',
+ as: :"token_#{methods}"
- get "/#{paths}", :controller => controller, :action => 'show',
- :as => :"#{methods}"
- get "/#{paths}/new", :controller => controller, :action => 'new',
- :as => :"new_#{methods}"
- post "/#{paths}", :controller => controller, :action => 'create'
- delete "/#{paths}", :controller => controller, :action => 'destroy'
+ get "/#{paths}", controller: controller, action: 'show',
+ as: :"#{methods}"
+ get "/#{paths}/new", controller: controller, action: 'new',
+ as: :"new_#{methods}"
+ post "/#{paths}", controller: controller, action: 'create'
+ delete "/#{paths}", controller: controller, action: 'destroy'
- get "/#{paths}/change_password", :controller => controller,
- :action => 'password_change',
- :as => "change_password_#{methods}"
- post "/#{paths}/change_password", :controller => controller,
- :action => 'change_password'
- post "/#{paths}/reset_password", :controller => controller,
- :action => 'reset_password',
- :as => "reset_password_#{methods}"
+ get "/#{paths}/change_password", controller: controller,
+ action: 'password_change',
+ as: "change_password_#{methods}"
+ post "/#{paths}/change_password", controller: controller,
+ action: 'change_password'
+ post "/#{paths}/reset_password", controller: controller,
+ action: 'reset_password',
+ as: "reset_password_#{methods}"
end
end
ActionDispatch::Routing::Mapper.send :include, MapperMixin