mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
Fix rubocop #2741
This commit is contained in:
parent
a70273a3b9
commit
d4712e7f9e
1 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,12 @@
|
|||
class Pricelist < ActiveRecord::Base
|
||||
include Versions # version/pricelist_version.rb
|
||||
|
||||
scope :valid, -> { where("valid_from <= ? AND valid_to >= ? OR valid_to IS NULL", Time.zone.now.end_of_day, Time.zone.now.beginning_of_day) }
|
||||
scope :valid, lambda {
|
||||
where(
|
||||
"valid_from <= ? AND valid_to >= ? OR valid_to IS NULL",
|
||||
Time.zone.now.end_of_day, Time.zone.now.beginning_of_day
|
||||
)
|
||||
}
|
||||
|
||||
monetize :price_cents
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue