lib/rom/memory/commands.rb in rom-2.0.2 vs lib/rom/memory/commands.rb in rom-3.0.0.beta1
- old
+ new
@@ -15,11 +15,10 @@
# @see ROM::Commands::Create#execute
def execute(tuples)
Array([tuples]).flatten.map { |tuple|
attributes = input[tuple]
- validator.call(attributes)
relation.insert(attributes.to_h)
attributes
}.to_a
end
end
@@ -32,10 +31,9 @@
use :schema
# @see ROM::Commands::Update#execute
def execute(params)
attributes = input[params]
- validator.call(attributes)
relation.map { |tuple| tuple.update(attributes.to_h) }
end
end
# In-memory delete command