Files
fizzy/app/models/current.rb
T
Mike Dalessio d41d50d52b Account.sole → Current.account
and some other de-tenant changes, including removing the controller
tenanting concerns
2025-11-17 09:11:40 -05:00

17 lines
514 B
Ruby

class Current < ActiveSupport::CurrentAttributes
attribute :session, :membership, :account
attribute :http_method, :request_id, :user_agent, :ip_address, :referrer
delegate :identity, to: :session, allow_nil: true
delegate :user, to: :membership, allow_nil: true
def session=(value)
super(value)
# # TODO:PLANB: not sure how to patch this up right now
# unless value.nil?
# self.membership = identity.memberships.find_by(tenant: ApplicationRecord.current_tenant)
# end
end
end