Eliminate deprecated scope and association arguments

This commit is contained in:
Tom Hughes 2013-06-27 00:35:56 +01:00
parent f0feca800d
commit ca30b879f6
12 changed files with 40 additions and 51 deletions

View file

@ -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

View file

@ -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?