fix routes

parent 823bc0ff
Pipeline #1403 canceled with stages
in 0 seconds
class ApplyJobsController < ApplicationController class ApplyJobsController < ApplicationController
include ApplicationHelper include ApplicationHelper
before_action :authenticate_user!
def new def new
job = Job.find_by(id: params[:job_id]) or not_found job = Job.find_by(id: params[:job_id]) or not_found
......
...@@ -56,7 +56,7 @@ class Users::RegistrationsController < Devise::RegistrationsController ...@@ -56,7 +56,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
# end # end
def after_update_path_for(resource) def after_update_path_for(resource)
my_path(resource) my_path
end end
# The path used after sign up for inactive accounts. # The path used after sign up for inactive accounts.
......
...@@ -8,14 +8,6 @@ h2.p-3.text-center ...@@ -8,14 +8,6 @@ h2.p-3.text-center
.card-body .card-body
= f.hidden_field :reset_password_token = f.hidden_field :reset_password_token
.field .field
= f.label :email
br
= f.email_field :email, disabled: true, autofocus: true, autocomplete: "email", class: 'form-control'
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
div
| Currently waiting confirmation for:
= resource.unconfirmed_email
.field
= f.label :password, "New password" = f.label :password, "New password"
br br
- if @minimum_password_length - if @minimum_password_length
......
...@@ -41,6 +41,6 @@ h2.p-3.text-center ...@@ -41,6 +41,6 @@ h2.p-3.text-center
.field .field
= f.label :cv, "CV" = f.label :cv, "CV"
br br
= f.file_field :cv, accept: User::VALID_FILE_UPLOAD , size: { less_than: 5.megabytes, message:"should be less than 5MB" } = f.file_field :cv, accept: User::VALID_FILE_UPLOAD, size: { less_than: 5.megabytes, message:"should be less than 5MB" }
.actions.p-2.text-center .actions.p-2.text-center
= f.submit "Update", class: "btn btn-primary" = f.submit "Update", class: "btn btn-primary"
\ No newline at end of file
...@@ -30,6 +30,6 @@ h2.p-3.text-center ...@@ -30,6 +30,6 @@ h2.p-3.text-center
.field .field
= f.label :cv, "CV" = f.label :cv, "CV"
br br
= f.file_field :cv, accept: "application/pdf", size: { less_than: 5.megabytes, message:"should be less than 5MB" } = f.file_field :cv, accept: User::VALID_FILE_UPLOAD, size: { less_than: 5.megabytes, message:"should be less than 5MB" }
.actions.p-3.text-center .actions.p-3.text-center
= f.submit "Sign up", class: "btn btn-primary" = f.submit "Sign up", class: "btn btn-primary"
\ No newline at end of file
...@@ -8,20 +8,19 @@ Rails.application.routes.draw do ...@@ -8,20 +8,19 @@ Rails.application.routes.draw do
get 'apply', to: 'apply_jobs#new' get 'apply', to: 'apply_jobs#new'
post 'confirm', to: 'apply_jobs#confirm' post 'confirm', to: 'apply_jobs#confirm'
post 'done', to: 'apply_jobs#done' post 'done', to: 'apply_jobs#done'
devise_for :users, controllers: { registrations: 'users/registrations', confirmations: 'users/confirmations', devise_for :users, skip: %i[sessions registrations passwords], controllers: { confirmations: 'users/confirmations' }
passwords: 'users/passwords', sessions: 'users/sessions' }, skip: %i[sessions registrations passwords] resources :users, only: :show
resources :user
get '/my', to: 'users#show' get '/my', to: 'users#show'
devise_scope :user do devise_scope :user do
get 'register/1', to: 'users/registrations#new', as: :new_user_registration get 'register/1', to: 'users/registrations#new', as: :new_user_registration
get 'register/2', to: 'users/registrations#show' get 'register/2', to: 'users/registrations#show'
get 'my/info', to: 'users/registrations#edit', as: :edit_user_registration get 'my/info', to: 'users/registrations#edit', as: :edit_user_registration
match '/my', to: 'devise/registrations#create', as: :user_registration, via: [:post] match '/my', to: 'users/registrations#create', as: :user_registration, via: [:post]
match '/my', to: 'devise/registrations#update', via: %i[put patch] match '/my', to: 'users/registrations#update', via: %i[put patch]
get 'forgot_password', to: 'users/passwords#new', as: :new_user_password get 'forgot_password', to: 'users/passwords#new', as: :new_user_password
get 'reset_password', to: 'users/passwords#edit', as: :edit_user_password get 'reset_password', to: 'users/passwords#edit', as: :edit_user_password
match 'reset_password', to: 'users/passwords#update', via: %i[put patch] match 'reset_password', to: 'users/passwords#update', via: %i[put patch]
match 'reset_password', to: 'users/passwords#create', as: :user_password, via: [:post] post 'reset_password', to: 'users/passwords#create', as: :user_password
get 'login', to: 'users/sessions#new', as: :new_user_session get 'login', to: 'users/sessions#new', as: :new_user_session
post 'login', to: 'users/sessions#create', as: :user_session post 'login', to: 'users/sessions#create', as: :user_session
delete 'logout', to: 'users/sessions#destroy', as: :destroy_user_session, via: Devise.mappings[:user].sign_out_via delete 'logout', to: 'users/sessions#destroy', as: :destroy_user_session, via: Devise.mappings[:user].sign_out_via
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment