Skip to content

Instantly share code, notes, and snippets.

@dandehavilland
Created September 12, 2019 09:34
Show Gist options
  • Save dandehavilland/3ca83722c250f0ab3acc2e7dab29e04d to your computer and use it in GitHub Desktop.
Save dandehavilland/3ca83722c250f0ab3acc2e7dab29e04d to your computer and use it in GitHub Desktop.
Sjabloon routes file
Rails.application.routes.draw do
resource :billing, controller: 'sjabloon/billing', only: [:create, :update, :destroy] do
member do
get 'setup', to: 'sjabloon/billing#new', as: 'new'
get '/', to: 'sjabloon/billing#show'
end
resources :plans, controller: 'sjabloon/plans', only: [:index, :update]
end
resource :card, controller: 'sjabloon/card', only: [:update]
resources :coupons, controller: 'sjabloon/coupons', only: [:index]
resources :charges, controller: 'sjabloon/charges', only: [:show]
resource :pricing, controller: 'sjabloon/pricing', only: [:show]
post '/webhooks/stripe', to: 'stripe_event/webhook#event'
resources :announcements, only: [:index]
authenticated :account do
root to: 'dashboard#show'
end
devise_for :accounts, path: "/", path_names: { sign_up: "signup", sign_in: "login", sign_out: "logout", edit: "edit" }, controllers: { masquerades: "admin/masquerades" }
get '/privacy', to: 'pages#privacy'
get '/terms', to: 'pages#terms'
get '/contact', to: 'pages#contact'
get '/about', to: 'pages#about'
root to: 'pages#home'
get '/500', to: 'errors#server_error'
get '/422', to: 'errors#unacceptable'
get '/404', to: 'errors#not_found'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment