Convert lib files to model concerns
This commit is contained in:
parent
877641fff9
commit
0a33c66146
2 changed files with 6 additions and 6 deletions
|
@ -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
|
|
@ -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?
|
Loading…
Add table
Add a link
Reference in a new issue