Fix behaviour of with_any_role method with no args#365
Open
Conversation
Member
Author
|
Travis-ci still fails on Mongoid specs because logs size limit (4M) gets busted. Don't know how to prevent this... |
Member
|
@EppO This little script is apparently written to get around that. https://gist.github.com/roidrage/5238585 |
User.with_any_role with no args should return all User instances having at least one role. fix #363 For the generator specs to pass, I needed to add this: ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") Otherwise, generators specs are failing because of `ActiveRecord::ConnectionNotEstablished: No connection pool for ActiveRecord::Base` error. I had to require explicitly active_view and active_controller gems for mongoid adapter to make generators specs pass for mongoid. I changed also mongoid.yml to use clients instead of sessions and disabled mongod logging that were flooding travis-ci outputs and reached the log size limit (4MB)
Member
Author
|
Mongoid specs are failing but it's unrelated to my commit (which are AR specific). Not sure these specs are passing on master. |
|
Is this is something that still needs fixing? I came here from CodeTriage, so apologies if I haven't followed proper etiquette or misunderstood what might be the best course of action here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User.with_any_rolewith no args should return all User instances having at least one role.fix #363