# app/models/current.rb
class Current < ActiveSupport::CurrentAttributes
  attribute :account
end
```

## Add middleware to catch the account param

We're trying to fetch the account number from the `params` and see if we have an account with that ID in this middleware. If so, store it in the `Current.account` model, where we can use it throughout the app.

```ruby{18,21,23,25}
## Multitenant Account Middleware
#