Sha256: caaa0408320e8c64baad6af3b719a18b054adcd09f1ba9227dba448dad686b6c

Contents?: true

Size: 377 Bytes

Versions: 2

Compression:

Stored size: 377 Bytes

Contents

module AutoScopes
	module Models
		class << self
			def check!
				load_association_file.each_pair do |model, associations|
					AssociationsChains.new(model.constantize, associations, []).look_inside_chain
				end
			end

			private 

			def load_association_file
				YAML.load_file(Rails.root.join(AutoScopes.config.auto_scopes_location + '.yml')) || []
			end
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
auto_scopes-0.1.2 lib/auto_scopes/models.rb
auto_scopes-0.1.1 lib/auto_scopes/models.rb