Adding e-mail confirmations
This commit is contained in:
		
							
								
								
									
										3
									
								
								app/controllers/auth/confirmations_controller.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								app/controllers/auth/confirmations_controller.rb
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
class Auth::ConfirmationsController < Devise::ConfirmationsController
 | 
			
		||||
  layout 'auth'
 | 
			
		||||
end
 | 
			
		||||
@@ -12,6 +12,12 @@ class Auth::SessionsController < Devise::SessionsController
 | 
			
		||||
  protected
 | 
			
		||||
 | 
			
		||||
  def after_sign_in_path_for(_resource)
 | 
			
		||||
    stored_location_for(:user) || root_path
 | 
			
		||||
    last_url = stored_location_for(:user)
 | 
			
		||||
 | 
			
		||||
    if [about_path].include?(last_url)
 | 
			
		||||
      root_path
 | 
			
		||||
    else
 | 
			
		||||
      last_url || root_path
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user