diff options
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r-- | activerecord/test/fixtures/mixin.rb | 73 | ||||
-rw-r--r-- | activerecord/test/fixtures/mixins.yml | 63 |
2 files changed, 0 insertions, 136 deletions
diff --git a/activerecord/test/fixtures/mixin.rb b/activerecord/test/fixtures/mixin.rb deleted file mode 100644 index 358dde1ae1..0000000000 --- a/activerecord/test/fixtures/mixin.rb +++ /dev/null @@ -1,73 +0,0 @@ -class Mixin < ActiveRecord::Base - -end - -class TreeMixin < Mixin - acts_as_tree :foreign_key => "parent_id", :order => "id" -end - -class TreeMixinWithoutOrder < Mixin - acts_as_tree :foreign_key => "parent_id" -end - -class RecursivelyCascadedTreeMixin < Mixin - acts_as_tree :foreign_key => "parent_id" - has_one :first_child, :class_name => 'RecursivelyCascadedTreeMixin', :foreign_key => :parent_id -end - - -class NestedSet < Mixin - acts_as_nested_set :scope => "root_id IS NULL" - - def self.table_name() "mixins" end -end - -class NestedSetWithStringScope < Mixin - acts_as_nested_set :scope => 'root_id = #{root_id}' - - def self.table_name() "mixins" end -end - -class NestedSetWithSymbolScope < Mixin - acts_as_nested_set :scope => :root - - def self.table_name() "mixins" end -end - -class NestedSetSuperclass < Mixin - acts_as_nested_set :scope => :root - - def self.table_name() "mixins" end -end - -class NestedSetSubclass < NestedSetSuperclass - -end - -class NestedSet < Mixin - acts_as_nested_set :scope => "root_id IS NULL" - - def self.table_name() "mixins" end -end - -class NestedSetWithStringScope < Mixin - acts_as_nested_set :scope => 'root_id = #{root_id}' - - def self.table_name() "mixins" end -end - -class NestedSetWithSymbolScope < Mixin - acts_as_nested_set :scope => :root - - def self.table_name() "mixins" end -end - -class NestedSetSuperclass < Mixin - acts_as_nested_set :scope => :root - - def self.table_name() "mixins" end -end - -class NestedSetSubclass < NestedSetSuperclass - -end diff --git a/activerecord/test/fixtures/mixins.yml b/activerecord/test/fixtures/mixins.yml index c79ff41070..0f60e92c2f 100644 --- a/activerecord/test/fixtures/mixins.yml +++ b/activerecord/test/fixtures/mixins.yml @@ -1,71 +1,8 @@ -# tree mixins -tree_1: - id: 1001 - type: TreeMixin - parent_id: - -tree_2: - id: 1002 - type: TreeMixin - parent_id: 1001 - -tree_3: - id: 1003 - type: TreeMixin - parent_id: 1002 - -tree_4: - id: 1004 - type: TreeMixin - parent_id: 1001 - -tree2_1: - id: 1005 - type: TreeMixin - parent_id: - -tree3_1: - id: 1006 - type: TreeMixin - parent_id: - -tree_without_order_1: - id: 1101 - type: TreeMixinWithoutOrder - parent_id: - -tree_without_order_2: - id: 1100 - type: TreeMixinWithoutOrder - parent_id: - -recursively_cascaded_tree_1: - id: 5005 - type: RecursivelyCascadedTreeMixin - parent_id: - -recursively_cascaded_tree_2: - id: 5006 - type: RecursivelyCascadedTreeMixin - parent_id: 5005 - -recursively_cascaded_tree_3: - id: 5007 - type: RecursivelyCascadedTreeMixin - parent_id: 5006 - -recursively_cascaded_tree_4: - id: 5008 - type: RecursivelyCascadedTreeMixin - parent_id: 5007 - - # Nested set mixins <% (1..10).each do |counter| %> set_<%= counter %>: id: <%= counter+3000 %> - type: NestedSet <% end %> # Big old set |