Eliminate deprecated scope and association arguments
This commit is contained in:
parent
f0feca800d
commit
ca30b879f6
12 changed files with 40 additions and 51 deletions
|
@ -5,7 +5,7 @@ module GeoRecord
|
|||
SCALE = 10000000
|
||||
|
||||
def self.included(base)
|
||||
base.scope :bbox, lambda { |bbox| base.where(OSM.sql_for_area(bbox)) }
|
||||
base.scope :bbox, ->(bbox) { base.where(OSM.sql_for_area(bbox)) }
|
||||
base.before_save :update_tile
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ module Redactable
|
|||
def self.included(base)
|
||||
# this is used to extend activerecord bases, as these aren't
|
||||
# in scope for the module itself.
|
||||
base.scope :unredacted, base.where(:redaction_id => nil)
|
||||
base.scope :unredacted, -> { base.where(:redaction_id => nil) }
|
||||
end
|
||||
|
||||
def redacted?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue