Sha256: 0f27c6e6549ba2f1753fddce68f51ae4088c3aa0e21b569db8e584076a220fa6

Contents?: true

Size: 225 Bytes

Versions: 14

Compression:

Stored size: 225 Bytes

Contents

class PostWithStatus < ActiveRecord::Base
  has_paper_trail

  # ActiveRecord::Enum is only supported in AR4.1+
  if defined?(ActiveRecord::Enum)
    enum :status => { :draft => 0, :published => 1, :archived => 2 }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
paper_trail-4.2.0 test/dummy/app/models/post_with_status.rb
paper_trail-4.1.0 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.2 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.1 test/dummy/app/models/post_with_status.rb
paper_trail-3.0.9 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.0 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.0.rc2 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.0.rc1 test/dummy/app/models/post_with_status.rb
paper_trail-3.0.8 test/dummy/app/models/post_with_status.rb
paper_trail-3.0.7 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.0.beta2 test/dummy/app/models/post_with_status.rb
paper_trail-4.0.0.beta1 test/dummy/app/models/post_with_status.rb
paper_trail-3.0.6 test/dummy/app/models/post_with_status.rb
paper_trail-3.0.5 test/dummy/app/models/post_with_status.rb