I'm having the same problem as this user. Based on the logs, I think you're right, the account is not being set. Here is the code from the application_controller.
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_action :configure_permitted_parameters, if: :devise_controller?
def require_account! redirect_to root_url(subdomain: 'www') if [email protected]? end def set_account @account = Account.find_by(subdomain: request.subdomain) end def configure_permitted_parameters devise_parameter_sanitizer.permit(:sign_up, keys: [:tos, account_attributes: [:subdomain]]) end
How else would I set the account?
Thanks in advance.
Posted in Apartment and Heroku
I am trying to implement Apartment. It works fine in development but the app won't load on production. I get this error:
Apartment::TenantNotFound (One of the following schema(s) is invalid: "ocapp" "public"):
I have researched and tweaked but can't seem to find out what's missing. Any help would be most appreciated.