Sha256: 389771cbe8a4cae7c1a69bb58b79482bbb8ca9872633793b070e244da1ef6318

Contents?: true

Size: 393 Bytes

Versions: 1

Compression:

Stored size: 393 Bytes

Contents

class Mixin < ActiveRecord::Base
  acts_as_tree :foreign_key => "parent_id", :order => "id"

end

class ListMixin < ActiveRecord::Base
  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

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-1.2.0 test/fixtures/mixin.rb