Skip to content

Rails 6.1.0.rc1 unable to establish connection to the database that holds our sessions #167

Open
@codeodor

Description

@codeodor

In Rails 6.0, we were able to connect the ActiveRecord Session Store to the database that holds our sessions, like this:

ActiveRecord::SessionStore::Session.connects_to database: { reading: "session_database_#{Rails.env}".to_sym, writing: "session_database_#{Rails.env}".to_sym }

However, in Rails 6.1.0.rc1, this gives an error:

NotImplementedError: `connects_to` can only be called on ActiveRecord::Base or abstract classes

As we cannot change the base class of ActiveRecord::SessionStore::Session, will there be (or is there) some other way to tell Rails that the session should always be fetched from a specific database?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions