lib/generators/templates/resource_controller.rb in merb_datamapper-1.0.12 vs lib/generators/templates/resource_controller.rb in merb_datamapper-1.0.13
- old
+ new
@@ -37,10 +37,10 @@
end
def update(id, <%= singular_model %>)
@<%= singular_model %> = <%= model_class_name %>.get(id)
raise NotFound unless @<%= singular_model %>
- if @<%= singular_model %>.update_attributes(<%= singular_model %>)
+ if @<%= singular_model %>.update(<%= singular_model %>)
redirect resource(@<%= singular_model %>)
else
display @<%= singular_model %>, :edit
end
end