Sha256: 219e4a37dd99b91c3b0e9d95def98aa329eb3867bba73b5d7c565aa87975ec63

Contents?: true

Size: 524 Bytes

Versions: 9

Compression:

Stored size: 524 Bytes

Contents

module Mongoid::Acts::NestedSet

  module TestDocument

    def self.included(base)
      base.extend(ClassMethods)
      base.send(:include, InstanceMethods)
    end


    module ClassMethods

      def test_set_dependent_option(val)
        self.acts_as_nested_set_options[:dependent] = val
      end

    end


    module InstanceMethods

      def test_set_attributes(attrs)
        attrs.each do |key, val|
          key = key.to_s
          @attributes[key] = val
        end
        self
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
glebtv-mongoid_nested_set-0.8.0 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.7.0 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.6.0 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.5.3 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.5.2 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.5.1 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.5.0 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.4.3 spec/models/test_document.rb
glebtv-mongoid_nested_set-0.4.2 spec/models/test_document.rb