Convert lib files to model concerns

This commit is contained in:
Andy Allan 2020-06-03 16:44:26 +02:00
parent 877641fff9
commit 0a33c66146
2 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,6 @@
module ConsistencyValidations
extend ActiveSupport::Concern
# Generic checks that are run for the updates and deletes of
# node, ways and relations. This code is here to avoid duplication,
# and allow the extention of the checks without having to modify the

View file

@ -1,10 +1,8 @@
require "osm"
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, -> { where(:redaction_id => nil) }
extend ActiveSupport::Concern
included do
scope :unredacted, -> { where(:redaction_id => nil) }
end
def redacted?