test/support/dummy/app/controllers/pages_controller.rb in simple_auth-3.0.0 vs test/support/dummy/app/controllers/pages_controller.rb in simple_auth-3.1.0
- old
+ new
@@ -1,7 +1,18 @@
+# frozen_string_literal: true
+
class PagesController < ApplicationController
- before_action :require_logged_user
+ before_action :require_logged_user, except: :log_in
def index
head :ok
+ end
+
+ def logged_area
+ head :ok
+ end
+
+ def log_in
+ user_session.record = User.first
+ redirect_to return_to(pages_logged_area_path)
end
end