From 9b3d94bf5ae42aba8556e3f5c2aa01840e29aa06 Mon Sep 17 00:00:00 2001 From: Alex Kholodniak Date: Wed, 19 Jun 2024 20:20:47 -0500 Subject: [PATCH] Fix method redefinition and circular require issues --- lib/clearance.rb | 2 +- lib/clearance/configuration.rb | 2 +- lib/clearance/engine.rb | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/clearance.rb b/lib/clearance.rb index 1b92beebe..197b4d37b 100644 --- a/lib/clearance.rb +++ b/lib/clearance.rb @@ -5,9 +5,9 @@ require 'clearance/back_door' require 'clearance/controller' require 'clearance/user' -require 'clearance/engine' require 'clearance/password_strategies' require 'clearance/constraints' +require 'clearance/engine' module Clearance end diff --git a/lib/clearance/configuration.rb b/lib/clearance/configuration.rb index b5f21eeb3..8a2c70280 100644 --- a/lib/clearance/configuration.rb +++ b/lib/clearance/configuration.rb @@ -135,7 +135,7 @@ class Configuration # The parameter for user routes. By default this is derived from the user # model. # @return [Symbol] - attr_accessor :user_parameter + attr_writer :user_parameter # Controls wether users are automatically signed in after successfully # resetting their password. diff --git a/lib/clearance/engine.rb b/lib/clearance/engine.rb index 2ee8687bf..bc1ba3147 100644 --- a/lib/clearance/engine.rb +++ b/lib/clearance/engine.rb @@ -1,4 +1,3 @@ -require "clearance" require "rails/engine" module Clearance