Module: KirguduBase::Models::Scopes::WithCreatedAtStart

Defined in:
app/helpers/kirgudu_base/models/scopes.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



37
38
39
40
41
42
43
44
# File 'app/helpers/kirgudu_base/models/scopes.rb', line 37

def self.included(base)
  base.scope :with_created_at_start, lambda {
    |value|
    if value
      base.where { created_at >= value }
    end
  }
end