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

Fix destroy arity #146

Closed
wants to merge 1 commit into from
Closed

Fix destroy arity #146

wants to merge 1 commit into from

Conversation

paneq
Copy link
Contributor

@paneq paneq commented Dec 28, 2010

Don't assume that the arity of active record method was not changed. Someone could extend the method so it takes some options and provides defaults.

For example: I extended destroy to work with validations and have a definition
like def destroy(options = {}).

…Someone could extend the method so it takes some options and provides defaults.
@jeremy
Copy link
Member

jeremy commented Jan 9, 2011

Looks good. Needs a failing test. Thanks!

@paneq
Copy link
Contributor Author

paneq commented Jan 10, 2011

Ok, I will provide a test.

@joshk
Copy link
Contributor

joshk commented Feb 9, 2011

Hey paneq,

I tried to create a failing test case for this issue but I could not replicate the case.

Here is the abstract of my test.

From my understanding you are overriding the destroy method in your class, doing some custom checks/logic, and then calling super so the original destroy runs? Please correct me if I am misunderstanding something.

Thanks,

Josh

@dhh dhh closed this Apr 27, 2011
@dhh
Copy link
Member

dhh commented Apr 27, 2011

Please reopen if a test emerges.

@paneq
Copy link
Contributor Author

paneq commented Apr 27, 2011

I will. I am on holiday right now so I finally have time to deal with it.

vijaydev pushed a commit that referenced this pull request Jun 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants