diff options
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r-- | activerecord/test/fixtures/mixin.rb | 6 | ||||
-rw-r--r-- | activerecord/test/fixtures/mixins.yml | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/mixin.rb b/activerecord/test/fixtures/mixin.rb index a0a92c4f64..0411c0d87e 100644 --- a/activerecord/test/fixtures/mixin.rb +++ b/activerecord/test/fixtures/mixin.rb @@ -16,6 +16,12 @@ class ListMixin < Mixin def self.table_name() "mixins" end end +class ListMixinSub1 < ListMixin +end + +class ListMixinSub2 < ListMixin +end + class ListWithStringScopeMixin < ActiveRecord::Base acts_as_list :column => "pos", :scope => 'parent_id = #{parent_id}' diff --git a/activerecord/test/fixtures/mixins.yml b/activerecord/test/fixtures/mixins.yml index 7b20965512..cb21349cd0 100644 --- a/activerecord/test/fixtures/mixins.yml +++ b/activerecord/test/fixtures/mixins.yml @@ -78,3 +78,12 @@ tree_<%= set[0] %>: root_id: 42 <% end %> + +# subclasses of list items +<% (1..4).each do |i| %> +list_sub_<%= i %>: + id: <%= i + 5000 %> + pos: <%= i %> + parent_id: 5000 + type: <%= (i % 2 == 1) ? ListMixinSub1 : ListMixinSub2 %> +<% end %> |