Sha256: 63e4fb601d0595d94ade5951c3d823f8fd1e994f619e2cdd2769a99533038472

Contents?: true

Size: 412 Bytes

Versions: 9

Compression:

Stored size: 412 Bytes

Contents

class Mixin < ActiveRecord::Base

end

class TreeMixin < Mixin 
    acts_as_tree :foreign_key => "parent_id", :order => "id"
end

class ListMixin < Mixin
  acts_as_list :column => "pos", :scope => :parent

  def self.table_name() "mixins" end
end


class ListWithStringScopeMixin < ActiveRecord::Base
  acts_as_list :column => "pos", :scope => 'parent_id = #{parent_id}'

  def self.table_name() "mixins" end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
activerecord-1.3.0 test/fixtures/mixin.rb
activerecord-1.4.0 test/fixtures/mixin.rb
activerecord-1.7.0 test/fixtures/mixin.rb
activerecord-1.5.1 test/fixtures/mixin.rb
activerecord-1.8.0 test/fixtures/mixin.rb
activerecord-1.9.0 test/fixtures/mixin.rb
activerecord-1.6.0 test/fixtures/mixin.rb
activerecord-1.5.0 test/fixtures/mixin.rb
activerecord-1.9.1 test/fixtures/mixin.rb