Sha256: 1bed99bcbfb3f8ea0efd0eebea172481e6984463ff5e92f962a4c714467ecde2

Contents?: true

Size: 589 Bytes

Versions: 5

Compression:

Stored size: 589 Bytes

Contents

class Page < ActiveRecord::Base
  cattr_accessor :feeling_good
  @@feeling_good = true
  
  acts_as_versioned :if => :feeling_good?
    
  def feeling_good?
    @@feeling_good == true
  end
end

class LockedPage < ActiveRecord::Base
  acts_as_versioned \
    :inheritance_column => :version_type, 
    :foreign_key        => :page_id, 
    :table_name         => :locked_pages_revisions, 
    :class_name         => 'LockedPageRevision',
    :version_column     => :lock_version,
    :limit              => 2,
    :if_changed         => :title
end

class SpecialLockedPage < LockedPage
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
acts_as_versioned-0.1.3 test/fixtures/page.rb
acts_as_versioned-0.2 test/fixtures/page.rb
acts_as_versioned-0.2.1 test/fixtures/page.rb
acts_as_versioned-0.1.2 test/fixtures/page.rb
acts_as_versioned-0.2.3 test/fixtures/page.rb