Sha256: 8acbdfc3fff4d8efb0bf4ff02eb343ea86ee26a28ceb7f1d52b904c6dee82494

Contents?: true

Size: 1.59 KB

Versions: 27

Compression:

Stored size: 1.59 KB

Contents

class Auth::Work::Instruction
	include Mongoid::Document
	include Mongoid::Timestamps
	include Auth::Concerns::Work::CommunicationFieldsConcern
	include Auth::Concerns::ImageLoadConcern
	
	attr_accessor :product_id
	attr_accessor :cart_item_id

	INSTRUCTION_TYPES = ["Before The Test","After The Test","During The Test","Who This Test is For","Who Should Not Take This Test"]

	embedded_in :cart_item, :class_name => Auth.configuration.cart_item_class, :polymorphic => true
	
	embedded_in :product, :class_name => Auth.configuration.product_class, :polymorphic => true

	field :summary_icon_class, type: String

	field :summary_text, type: String

	field :summary_icon_color, type: String

	field :include_in_summary, type: Boolean, default: false

	field :title, type: String

	field :description, type: String

	embeds_many :links, :class_name => "Auth::Work::Link"
	embeds_many :bullets, :class_name => "Auth::Work::Bullet"
	embeds_many :communications, :class_name => "Auth::Work::Communication", :as => :instruction_communications

	########################################################################
	##
	##
	## Overridden methods from communication_fields_concern.rb
	##
	##
	########################################################################
	def get_link(args={})
		if self.product_id
			Rails.application.routes.url_helpers.instruction_url({:product_id => self.product_id, :id => self.id.to_s})
		elsif self.cart_item_id
			Rails.application.routes.url_helpers.instruction_url({:cart_item_id => self.cart_item_id, :id => self.id.to_s})
		end
	end

	## okay let me test upto this point.
	## create a 

end

Version data entries

27 entries across 27 versions & 1 rubygems

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