Sha256: 19a4997250b59dfad4dc466db4b58caa07de02300ae661740c04976217cd7240

Contents?: true

Size: 213 Bytes

Versions: 10

Compression:

Stored size: 213 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

10 entries across 10 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-5.2.3/test/dummy/app/models/post_with_status.rb
paper_trail-6.0.0 test/dummy/app/models/post_with_status.rb
paper_trail-5.2.3 test/dummy/app/models/post_with_status.rb
paper_trail-5.2.2 test/dummy/app/models/post_with_status.rb
paper_trail-5.2.1 test/dummy/app/models/post_with_status.rb
paper_trail-5.2.0 test/dummy/app/models/post_with_status.rb
paper_trail-5.1.1 test/dummy/app/models/post_with_status.rb
paper_trail-5.1.0 test/dummy/app/models/post_with_status.rb
paper_trail-5.0.1 test/dummy/app/models/post_with_status.rb
paper_trail-5.0.0 test/dummy/app/models/post_with_status.rb