Module: UnitMeasurements::Rails::ActiveRecord::Density
- Defined in:
- lib/unit_measurements/rails/unit_groups/density.rb
Overview
The UnitMeasurements::Rails::ActiveRecord::Density
module provides a convenient way to define density-measured attributes in ActiveRecord
models.
It acts as a wrapper for the measured
method, simplifying the definition of density-measured attributes without directly invoking the measured
method.
Class Method Summary collapse
-
.measured_density(*measured_attrs, **options) ⇒ void
Defines density-measured attributes in the
ActiveRecord
model.
Class Method Details
.measured_density(*measured_attrs, **options) ⇒ void
This method returns an undefined value.
Defines density-measured attributes in the ActiveRecord
model.
This method serves as a wrapper around the measured
method and allows easy definition of density-measured attributes by accepting an array of attribute names along with their options.
42 43 44 |
# File 'lib/unit_measurements/rails/unit_groups/density.rb', line 42 def measured_density(*measured_attrs, **) measured(UnitMeasurements::Density, *measured_attrs, **) end |