Sha256: 850214a8f90e27be67a580a5d860dea262e30e5e55cb7fa721e9f82d21a0cc87

Contents?: true

Size: 287 Bytes

Versions: 5

Compression:

Stored size: 287 Bytes

Contents

class Widget < ActiveRecord::Base
  has_paper_trail
  has_one :wotsit

  if ActiveRecord::VERSION::STRING.to_f >= 4.0 # `has_many` syntax for specifying order uses a lambda in Rails 4
    has_many :fluxors, lambda { order(:name) }
  else
    has_many :fluxors, :order => :name
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
paper_trail-3.0.0 test/dummy/app/models/widget.rb
paper_trail-3.0.0.rc2 test/dummy/app/models/widget.rb
paper_trail-3.0.0.rc1 test/dummy/app/models/widget.rb
paper_trail_without_deprecated-3.0.0.beta1 test/dummy/app/models/widget.rb
paper_trail-3.0.0.beta1 test/dummy/app/models/widget.rb