module Gutentag::Multitenancy::TagExtensions

Public Class Methods

included(base) click to toggle source
# File lib/gutentag/multitenancy/tag_extensions.rb, line 5
def self.included(base)
  base.attr_accessible :tenant_id if ::ActiveRecord::VERSION::MAJOR == 3

  base.class_eval do
    scope :by_tenant_id, ->(tenant_id) { where tenant_id: tenant_id }
  end

  base.extend ClassMethods
end