]> git.openstreetmap.org Git - rails.git/blob - lib/redactable.rb
Adding first cut of Redactions support
[rails.git] / lib / redactable.rb
1 require 'osm'
2
3 module Redactable
4   def redacted?
5     not self.redaction.nil?
6   end
7
8   def redact!(redaction)
9     # check that this version isn't the current version
10     raise OSM::APICannotRedactError.new if self.is_latest_version?
11
12     # make the change
13     self.redaction = redaction
14   end
15 end