Sha256: 63c56e9e101c9fdf8cf3831261e2a7b78eb43aafc13025daa20981301edfe74d
Contents?: true
Size: 370 Bytes
Versions: 2
Compression:
Stored size: 370 Bytes
Contents
class Widget < ActiveRecord::Base has_paper_trail has_one :wotsit EXCLUDED_NAME = 'Biglet' validates :name, :exclusion => { :in => [EXCLUDED_NAME] } if ::ActiveRecord::VERSION::MAJOR >= 4 # `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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paper_trail-4.0.0.beta2 | test/dummy/app/models/widget.rb |
paper_trail-4.0.0.beta1 | test/dummy/app/models/widget.rb |