Permalink
Browse files

Do not send record data when destroying it

  • Loading branch information...
1 parent 2ccf796 commit cf1d5dd3c44703054b902b4acd87c8efa9788639 @remiprev committed Jul 4, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/her/model/orm.rb
View
@@ -166,10 +166,9 @@ def save # {{{
# @user.destroy
# # Called via DELETE "/users/1"
def destroy # {{{
- params = @data.dup
resource = self
self.class.wrap_in_hooks(resource, :destroy) do |resource, klass|
- klass.request(params.merge(:_method => :delete, :_path => "#{request_path}")) do |parsed_data|
+ klass.request(:_method => :delete, :_path => "#{request_path}") do |parsed_data|
@data = parsed_data[:data]
@metadata = parsed_data[:metadata]
@errors = parsed_data[:errors]

0 comments on commit cf1d5dd

Please sign in to comment.