lib/generators/authentication/templates/controllers/sessions_controller.rb.erb in orthodox-0.3.5 vs lib/generators/authentication/templates/controllers/sessions_controller.rb.erb in orthodox-0.3.6
- old
+ new
@@ -1,12 +1,12 @@
# frozen_string_literal: true
# Controller for managing sessions for <%= plural_class_name %>.
-# Automatically generated by the orthodox gem (https://github.com/katanacode/orthodox)
-# (c) Copyright 2019 Katana Code Ltd. All Rights Reserved.
+# Automatically generated by the orthodox gem (https://github.com/bodacious/orthodox)
+
class <%= plural_class_name %>::SessionsController < <%= plural_class_name %>::BaseController
-
+
skip_before_action :authenticate_<%= singular_name %>
def new
@<%= singular_name %>_session = <%= class_name %>Session.new(<%= singular_name %>_session_params)
end
@@ -18,10 +18,10 @@
redirect_to(<%= plural_name %>_dashboard_url, notice: "Successfully signed in")
else
render :new
end
end
-
+
def destroy
sign_out(:<%= singular_name %>)
redirect_to root_url, notice: "Successfully signed out"
end