Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/breath/config/route.rb

Instance Method Summary collapse

Instance Method Details

#breath(routes_name, &resources) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/breath/config/route.rb', line 2

def breath(routes_name, &resources)
  namespace routes_name do
    get "/login" => "sessions#new"
    post "login" => "sessions#login"
    delete "logout" => "sessions#logout"

    resources.call if resources.present?
  end
end