Rails.application.routes.draw do root 'application#index' get 'login/new', to: 'login#new' post 'login', to: 'login#create' delete 'login/logout', to: 'login#delete' get 'markdown', to: 'application#markdown' # XXX Mantenemos solo esta ruta acá porque form_for no reconoce @site # como un objeto válido resources :invitadxs, only: [:create] resources :sites, only: [:index, :show], constraints: { site_id: /[^\/]+/, id: /[^\/]+/ } do get 'public/:type/:basename', to: 'sites#send_public_file' resources :posts resources :templates resources :invitadxs, only: [:index, :new, :show] do get :confirmation, to: 'invitadxs#confirmation' end get :'invitadxs/login/new', to: 'login#new' post :'invitadxs/login', to: 'login#create' get 'i18n', to: 'i18n#index' get 'i18n/edit', to: 'i18n#edit' post 'i18n', to: 'i18n#update' post 'enqueue', to: 'sites#enqueue' get 'build_log', to: 'sites#build_log' post 'reorder_posts', to: 'sites#reorder_posts' end end