app/controllers/tramway/auth/web/sessions_controller.rb in tramway-auth-1.2.1 vs app/controllers/tramway/auth/web/sessions_controller.rb in tramway-auth-1.2.1.1
- old
+ new
@@ -4,9 +4,10 @@
module Web
class SessionsController < ::Tramway::Auth::Web::ApplicationController
before_action :redirect_if_signed_in, except: :destroy
def new
+ @application = Tramway::Core.application&.model_class&.first || Tramway::Core.application
@session_form = ::Tramway::Auth::SessionForm.new ::Tramway::User::User.new
end
def create
@session_form = ::Tramway::Auth::SessionForm.new ::Tramway::User::User.active.find_or_initialize_by email: params[:user][:email]