I'm using a gem https://github.com/dsaronin/milia. One of my models is called Group:
class Group < ActiveRecord::Base
#.....
acts_as_tenant
end
But I can't create it for some reason. Here's rails console:
t = Tenant.create(cname: 'cname1',…
I'm using a gem milia and devise.
class User < ActiveRecord::Base
# ...
acts_as_universal_and_determines_account
#...
end
class Tenant < ActiveRecord::Base
acts_as_universal_and_determines_tenant
def self.create_new_tenant(params)
…
I'm using Acts_as_tenant. The doc says "adds a handy helper to your controllers current_tenant, containing the current tenant object".
But, I'd like to access the current tenant in a model. The Tenant model contains a column - request_closed.
I…
There are a few post on this subject but the light has not turned on yet.
I'm trying to extend a rails gem/engine Plutus to use acts_as_tenant
Plutus provides a double entry accounting system for an application. One of the limitations is that the…
I'm using Clearance for authentication and acts_as_tenant to set tenant
User.rb
Clearance::User::Validations.module_eval do
included do
email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :email, uniqueness: { scope:…
I'm using devise and acts_as_tenant gem and it seems the devise controllers don't inherit from ApplicationController (???) so don't have access to set_current_tenant_by_subdomain
When the password reset link is clicked I get no Tenant scoping by…
I have some overall permissions set against the current_tenant - I can reference these from within a controller i.e.
current_tenant.has_some_capability?
works fine.
I would like to wrap this up using CanCan, if I put the following in my ability.rb…