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

Alias #values_of to #plucks and #value to #pluck #15

Closed
krainboltgreene opened this issue May 20, 2013 · 5 comments
Closed

Alias #values_of to #plucks and #value to #pluck #15

krainboltgreene opened this issue May 20, 2013 · 5 comments

Comments

@krainboltgreene
Copy link

ActiveRecord has a similar method called #pluck, and there's really no need for both, especially since #pluck only handles 1 argument.

@ernie
Copy link
Owner

ernie commented May 20, 2013

I'm not going to clobber the AR method, even if I do wish pluck was implemented via Valium. This is unnecessary.

@ernie ernie closed this as completed May 20, 2013
@krainboltgreene
Copy link
Author

Alright, I'm going to fork valium, add it, and release it as "plucked" with
a few refactors and hstore support.

Thanks for looking at the issue.

On Mon, May 20, 2013 at 3:54 AM, Ernie Miller notifications@github.comwrote:

I'm not going to clobber the AR method, even if I do wish pluck was
implemented via Valium. This is unnecessary.


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-18141813
.

Kurtis Rainbolt-Greene, Hacker
Software Developer
612 S. Flower St.
Los Angeles, CA, 90017

@ernie
Copy link
Owner

ernie commented May 20, 2013

@krainboltgreene best of luck if you decide to do so, but as someone who's done his fair share of overriding stock AR behavior in gems, I'd recommend against it. It'll lead to a world of hurt down the line, and bogus issues galore. There's a reason I immediate responded with "no." :)

@ernie
Copy link
Owner

ernie commented May 20, 2013

Particularly since in more recent AR versions, pluck does in fact support multiple values.

@avdi
Copy link

avdi commented May 20, 2013

Seems like an awfully trivial reason to fork. Not to mention that monkeypatching pre-existing methods from other libraries is the worst form of monkeypatching.

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

No branches or pull requests

3 participants