Sha256: 019dc8ae3f5bbd3a15216b150480e648b622281ac6883c8354f349baef05130f

Contents?: true

Size: 345 Bytes

Versions: 7

Compression:

Stored size: 345 Bytes

Contents

# frozen_string_literal: true
module Measured::Rails::ActiveRecord::Weight
  extend ActiveSupport::Concern

  module ClassMethods
    def measured_weight(*fields)
      measured(Measured::Weight, *fields)
    end
  end
end

ActiveSupport.on_load(:active_record) do
  ::ActiveRecord::Base.send :include, Measured::Rails::ActiveRecord::Weight
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
measured-rails-2.8.2 lib/measured/rails/units/weight.rb
measured-rails-2.8.1 lib/measured/rails/units/weight.rb
measured-rails-2.8.0 lib/measured/rails/units/weight.rb
measured-rails-2.7.1 lib/measured/rails/units/weight.rb
measured-rails-2.6.0 lib/measured/rails/units/weight.rb
measured-rails-2.5.2 lib/measured/rails/units/weight.rb
measured-rails-2.5.1 lib/measured/rails/units/weight.rb