Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename DeleteOperation#destroy to #delete #707

Merged

Conversation

matthewmcgarvey
Copy link
Member

Fixes #694

Comment on lines -95 to -107
def self.delete{% if with_bang %}!{% end %}(*args, **named_args{% if !with_bang %}, &block{% end %})
{% verbatim do %}
{% raise <<-ERROR
DeleteOperations do not have a 'delete' method.

Try this...

▸ Use 'destroy' to delete a record

ERROR
%}
{% end %}
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should leave this in, but name it destroy with a message like "destroy has been renamed to delete". Maybe with the type name or something so it's easy to find which ones you have to replace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it in, unfortunately I had to move the compilation error because @type was not the inherited type and it was a mess of macro code in the backtrace.

This is something that I hope can be removed in the future so I don't think it's a big deal.

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@matthewmcgarvey matthewmcgarvey merged commit 504302f into luckyframework:master Jul 14, 2021
@matthewmcgarvey matthewmcgarvey deleted the destroy-to-delete branch July 14, 2021 14:52
@jwoertink jwoertink added the BREAKING CHANGE This will cause a breaking change label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE This will cause a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change DeleteOperation#destroy to #delete
2 participants