Skip to content

NameError: `@' is not allowed as an instance variable name #765

Description

@fguillen

Expected Behavior

No error

Actual Behavior

The application works good until it doesn't any more :/

When I try to access to the website I see this error:

File "/Users/user/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/authlogic-6.4.2/lib/authlogic/session/base.rb" line 1127 in instance_variable_set
File "/Users/user/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/authlogic-6.4.2/lib/authlogic/session/base.rb" line 1127 in initialize
File "/Users/user/Development/MyApp/app/controllers/front/front_sessions_controller.rb" line 5 in new
File "/Users/user/Development/MyApp/app/controllers/front/front_sessions_controller.rb" line 5 in new

I see in the code here:

that password_field may be empty an there for we are executing this:

instance_variable_set("@", nil)

This is my code affected line:

defnew@front_session=FrontSession.newend

This is my FrontSession implementation:

classFrontSession < Authlogic::Session::Baseauthenticate_withFrontUserdefto_keynew_record? ? nil : [send(self.class.primary_key)]enddefpersisted?falseendend

This is in my FrontUser:

classFrontUser < ApplicationRecordacts_as_authenticdo |config|
config.crypto_provider= ::Authlogic::CryptoProviders::SCryptconfig.session_class=FrontSessionend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions