lib/simple_auth/railtie.rb in simple_auth-3.1.0 vs lib/simple_auth/railtie.rb in simple_auth-3.1.1

- old
+ new

@@ -3,7 +3,14 @@ module SimpleAuth class Railtie < Rails::Railtie generators do require "simple_auth/generator" end + + config.after_initialize do + ActiveSupport.on_load(:active_record) do + SimpleAuth::Session.record_not_found_exceptions << + ActiveRecord::RecordNotFound + end + end end end