Module: Concerns::Percentable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/percentable.rb
Overview
This concern defines a percent complete value for the models.
Each model must declare which attributes are concerned and what is the way to compute the percent. If no lambda is set the default one is !value.blank?.
Exemple :
percent :post, -> value { value != “foobar” } The attribute will not be considered as complete as long as its value is “foobar”.
Defined Under Namespace
Modules: ClassMethods