Fix routes

parent 0ce58138
Pipeline #931 canceled with stages
in 0 seconds
......@@ -17,7 +17,7 @@ class User < ApplicationRecord
validates :email, presence: true, format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
PASSWORD_FORMAT = /\A(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/x
PASSWORD_FORMAT = /\A(?=.{6,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/x
validates :password, allow_nil: true, format: { with: PASSWORD_FORMAT, message: "is too short or not strength" }
def self.new_remember_token
......
......@@ -3,9 +3,9 @@ Rails.application.routes.draw do
resources :users
resources :sessions, only: [:new, :create, :destroy]
match '/my', to: 'users#my_page', via: 'get', as: :my_page
match '/my/info', to: 'users#my_info', via: 'get', as: :my_page_info
match '/login', to: 'sessions#new', via: 'get', as: :login
get '/my', to: 'users#my_page', as: :my_page
get '/my/info', to: 'users#my_info', as: :my_page_info
get '/login', to: 'sessions#new', as: :login
match '/logout', to: 'sessions#destroy', via: 'delete', as: :logout
resources :jobs
......
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