Sha256: f4305e01a53d4356dab1b0ef8c6a19ffd28c4a3d5f111fbc0a79f182adb655e4
Contents?: true
Size: 495 Bytes
Versions: 22
Compression:
Stored size: 495 Bytes
Contents
module Guts # Handled adding a default scope to Active Record calls for multisites module MultisiteScopeConcern extend ActiveSupport::Concern included do # http://api.rubyonrails.org/classes/ActiveRecord/Scoping/Default/ClassMethods.html default_scope do # Scope queries to the current site # See: Guts::ApplicationController#current_site for where current_id is set to model where(site_id: Guts::Site.current_id) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems