Class: Auth::Work::Instruction

Inherits:
Object
  • Object
show all
Includes:
Concerns::ImageLoadConcern, Concerns::Work::CommunicationFieldsConcern, Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/auth/work/instruction.rb

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cart_item_idObject

Returns the value of attribute cart_item_id.



8
9
10
# File 'app/models/auth/work/instruction.rb', line 8

def cart_item_id
  @cart_item_id
end

#product_idObject

Returns the value of attribute product_id.



7
8
9
# File 'app/models/auth/work/instruction.rb', line 7

def product_id
  @product_id
end

Instance Method Details

Overridden methods from communication_fields_concern.rb



39
40
41
42
43
44
45
# File 'app/models/auth/work/instruction.rb', line 39

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