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

Modify unscoped usage guide to include chaining [ci skip] #22343

Merged
merged 1 commit into from
Dec 1, 2015

Conversation

jeffminnear
Copy link
Contributor

No description provided.

@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@eileencodes
Copy link
Member

Hi @jeffminnear thanks for the PR! Here are a couple of changes I think would make this better:

  1. Add the SQL for the examples you added
  2. Put the note about how unscoped and scope don't work together so you need to use a block. The change you made doesn't make it clear that you use a block when you need to scope and unscope.
  3. Add [ci skip] to your commit message (for guides and documentation PR's) so that travis doesn't run.

Thanks!

@jeffminnear jeffminnear changed the title Modify unscoped usage guide to include chaining Modify unscoped usage guide to include chaining [ci skip] Nov 19, 2015
@jeffminnear
Copy link
Contributor Author

  1. Put the note about how unscoped and scope don't work together so you need to use a block. The change you made doesn't make it clear that you use a block when you need to scope and unscope.

It actually seems that they do work together now. I have tested it in the Rails console written as both a scope and a class method, and it appears to be working fine.

@eliotsykes
Copy link
Contributor

Confirmed unscoped chained with a named scope working, e.g.

# Seen working
Subscription.expired.unscoped
Subscription.unscoped.expired

@eileencodes
Copy link
Member

Ok, thanks for checking the scoping! Can you squash your commits into one?

claudiob added a commit that referenced this pull request Dec 1, 2015
Modify unscoped usage guide to include chaining [ci skip]
@claudiob claudiob merged commit c403edf into rails:master Dec 1, 2015
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

5 participants