Skip to content

Commit

Permalink
Add destination param
Browse files Browse the repository at this point in the history
  • Loading branch information
sachac committed Jun 16, 2017
1 parent bcb6040 commit f7cd8cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/records_controller.rb
Expand Up @@ -37,7 +37,7 @@ def index
:entries => @records
}
end
respond_with @data
respond_with @data, :location => params[:destination]
end

# GET /records/1
Expand Down Expand Up @@ -114,7 +114,7 @@ def destroy
authorize! :manage_account, current_account
@record = current_account.records.find(params[:id])
@record.destroy
respond_with @record, :location => records_url
respond_with @record, :location => (params[:destination] || records_path)
end

def clone
Expand Down

0 comments on commit f7cd8cb

Please sign in to comment.