Use unscoped Rails 3 finders in ActiveRecord adapter #42

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@jcf

jcf commented Jul 17, 2012

I use paranoia in one of my apps, which means I can't use the standard ActiveRecord adapter very easily.

I'd like to suggest all finds within the ActiveRecord adapter should be unscoped to avoid default scopes.

For now I'm happy to monkey-patch pickle in my app, but thought this might be worth a discussion.

@chewi

This comment has been minimized.

Show comment Hide comment
@chewi

chewi Nov 21, 2014

Collaborator

@jondkinney felt this was a bad idea and I agree. Someone else might argue that they want their default scopes preserved. In my experience, default scopes are very difficult to work with and probably shouldn't be used for anything more than ordering. I know where you're coming from as I used to use is_paranoid but I found it just wasn't worth the hassle in the end.

Collaborator

chewi commented Nov 21, 2014

@jondkinney felt this was a bad idea and I agree. Someone else might argue that they want their default scopes preserved. In my experience, default scopes are very difficult to work with and probably shouldn't be used for anything more than ordering. I know where you're coming from as I used to use is_paranoid but I found it just wasn't worth the hassle in the end.

@chewi chewi closed this Nov 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment