You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm doing my own implementation of the session class, logically using this gem to save the sessions in a database.
Although I am aware that the data attribute contains the reference to the user, I customized my session model to add a field called user_id, being referenced in the database.
The problem is with the association in rail models, placing the line belongs_to :user will cause the following error:
(0.4ms) BEGIN
↳ /.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activerecord-5.2.4.1/lib/active_record/log_subscriber.rb:98
(0.3ms) ROLLBACK
↳ /.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/activerecord-5.2.4.1/lib/active_record/log_subscriber.rb:98
Warning! ActionDispatch::Session::ActiveRecordStore failed to save session. Content dropped.
ActionController::InvalidAuthenticityToken - ActionController::InvalidAuthenticityToken:
appsignal (2.10.0) lib/appsignal/rack/rails_instrumentation.rb:19:in 'call
I would like to know if anyone knows how to fix it or if they have any correct implementation of the session model
The text was updated successfully, but these errors were encountered:
Hi, I'm doing my own implementation of the session class, logically using this gem to save the sessions in a database.
Although I am aware that the data attribute contains the reference to the user, I customized my session model to add a field called user_id, being referenced in the database.
The problem is with the association in rail models, placing the line belongs_to :user will cause the following error:
I would like to know if anyone knows how to fix it or if they have any correct implementation of the session model
The text was updated successfully, but these errors were encountered: