lib/locomotive/steam/adapters/filesystem.rb in locomotivecms_steam-1.0.0 vs lib/locomotive/steam/adapters/filesystem.rb in locomotivecms_steam-1.0.1

- old
+ new

@@ -43,10 +43,17 @@ sanitizer.apply_to_entity_with_dataset(entity, dataset) end entity end + def inc(mapper, entity, attribute, amount = 1) + entity.tap do + entity[attribute] ||= 0 + entity[attribute] += amount + end + end + def delete(mapper, scope, entity) # TODO: to be implemented end def find(mapper, scope, id) @@ -107,10 +114,10 @@ end end def build_sanitizers hash = Hash.new { build_klass('Sanitizers', :simple).new } - %i(pages content_types content_entries snippets).inject(hash) do |memo, name| + %i(sites pages content_types content_entries snippets).inject(hash) do |memo, name| memo[name] = build_klass('Sanitizers', name).new memo end end