Module | ActiveRecord::Acts::DocumentNode::InstanceMethods
In: | lib/acts_as_document_node.rb

### Methods

content_as_document_node fragment_options_as_document_node name_as_document_node number_as_document_node product_as_document_node url_options_as_document_node

### Public Instance methods

content_as_document_node()

[Source]

        # File lib/acts_as_document_node.rb, line 46
    46:         def content_as_document_node
    47:           __send__(product_as_document_node.document_content_method)
    48:         end

fragment_options_as_document_node()

[Source]

        # File lib/acts_as_document_node.rb, line 34
    34:         def fragment_options_as_document_node
    35:           {:product => product_as_document_node, :document => self}
    36:         end

name_as_document_node()

[Source]

        # File lib/acts_as_document_node.rb, line 38
    38:         def name_as_document_node
    39:           __send__(product_as_document_node.document_name_method)
    40:         end

number_as_document_node()

[Source]

        # File lib/acts_as_document_node.rb, line 42
    42:         def number_as_document_node
    43:           __send__(product_as_document_node.document_number_method)
    44:         end

product_as_document_node()

[Source]

        # File lib/acts_as_document_node.rb, line 24
    24:         def product_as_document_node
    25:           product = Product.find(:all, :conditions => {:model_name => self.class.to_s}).find(&:document?)
    26:           raise "acts_as_document_node: product not found" unless product
    27:           product
    28:         end

url_options_as_document_node()

[Source]

        # File lib/acts_as_document_node.rb, line 30
    30:         def url_options_as_document_node
    31:           {:product_id => product_as_document_node.id, :id => id}
    32:         end

[Validate]