Module: KirguduBase::Models::BasicProperties::Portal

Included in:
Common::PortalUser, Settings::Group, Settings::Option, Settings::Value
Defined in:
app/helpers/kirgudu_base/models/basic_properties.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



109
110
111
112
113
114
115
116
# File 'app/helpers/kirgudu_base/models/basic_properties.rb', line 109

def self.included(base)
	base.belongs_to :portal, class_name: ::KirguduBase::Common::Portal, foreign_key: :portal_id
	base.scope :by_portal, lambda { |value| base.where(portal_id: value) if value }

	base.class_eval do
		include InstanceMethods
	end
end