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

Rails 4.1.1 #415

Merged
merged 4 commits into from
Jun 10, 2014
Merged

Rails 4.1.1 #415

merged 4 commits into from
Jun 10, 2014

Conversation

tristanoneil
Copy link
Contributor

🍴 Upgrades to Rails 4.1.1 and makes a few changes to account for some API changes.

The permit matcher now conflicts with the shoulda permit matcher this
renames the permit matcher to permit_authorization to prevent this
conflict and to make intentions a bit more clear.
To prevent the validates_uniqueness matcher from raising a chef version
constraint error this pins shoulda-matchers at a commit where setting
default values for scopes was reverted, we can remove this ref once it's
released to rubygems.
@@ -55,6 +55,8 @@ def search
@results = Cookbook.search(
params.fetch(:q, nil)
).offset(@start).limit(@items)

@total = @results.count(:all)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the (:all) is necessary, is it? Isn't that just an alias for *, which is the default for count?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a recent change to the count method it doesn't play nice with pg_search see this issue and this issue the recommendation seems to be to explicitly call count(:all) if you have any better suggestions let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for enlightening me.

@tristanoneil
Copy link
Contributor Author

@raskchanky did you review all of this? This good to go?

@raskchanky
Copy link
Contributor

Yep 👍

tristanoneil added a commit that referenced this pull request Jun 10, 2014
@tristanoneil tristanoneil merged commit ea634b3 into master Jun 10, 2014
@tristanoneil tristanoneil deleted the rails-4.1.1 branch June 10, 2014 16:05
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.

2 participants