Sha256: 4e12accd84f1e855b3ec99ca43c48405b0cfd5d41608eecba02bdfbb0924a25a

Contents?: true

Size: 1.29 KB

Versions: 53

Compression:

Stored size: 1.29 KB

Contents

class Auth::System::Instant

	include Mongoid::Document

	embeds_many :collectors, :class_name => "Auth::System::Collector"
	embeds_many :plans, :class_name => "Auth::System::Plan"

	## it can have a product count
	field :product_count, type: Integer

	## it will have a product id.
	field :product_id, type: String

	## the location data for this thing.
	field :geom, type: Array
	

	def self.build_instants(start_date,end_date,product_ids)
		product_ids.each do |product_id|
			begin
				product = Auth.configuration.product_class.constantize.find(product_id)

				product.max_at_any_instant.times do |product_count|

					## so the first step is to pass a fictional product count to the products

					## we will have to iterate wherever that entity was being used in those minutes -> there it will have to 
					## this could become hundreds of thousands of updates
					## that doesnt make sense
					## actually
					## ideally we should only be booking that entity.
					## and later on doing some kind of join.
					## so suppose i search for just the capacity
					## for some minute brackets, for those capacities, they get taken
					## if you only want to update the minute based schedules when something changes, then 


				end


			rescue Mongoid::Errors::DocumentNotFound

			end 
		end 
	end



end	

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 app/models/auth/system/instant.rb
wordjelly-auth-1.5.9 app/models/auth/system/instant.rb
wordjelly-auth-1.5.8 app/models/auth/system/instant.rb
wordjelly-auth-1.5.7 app/models/auth/system/instant.rb
wordjelly-auth-1.5.6 app/models/auth/system/instant.rb
wordjelly-auth-1.5.5 app/models/auth/system/instant.rb
wordjelly-auth-1.5.4 app/models/auth/system/instant.rb
wordjelly-auth-1.5.3 app/models/auth/system/instant.rb
wordjelly-auth-1.5.2 app/models/auth/system/instant.rb
wordjelly-auth-1.5.1 app/models/auth/system/instant.rb
wordjelly-auth-1.5.0 app/models/auth/system/instant.rb
wordjelly-auth-1.4.9 app/models/auth/system/instant.rb
wordjelly-auth-1.4.8 app/models/auth/system/instant.rb
wordjelly-auth-1.4.7 app/models/auth/system/instant.rb
wordjelly-auth-1.4.6 app/models/auth/system/instant.rb
wordjelly-auth-1.4.5 app/models/auth/system/instant.rb
wordjelly-auth-1.4.4 app/models/auth/system/instant.rb
wordjelly-auth-1.4.3 app/models/auth/system/instant.rb
wordjelly-auth-1.4.2 app/models/auth/system/instant.rb
wordjelly-auth-1.4.0 app/models/auth/system/instant.rb