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

Fix behaviour of with_any_role method with no args #365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EppO
Copy link
Member

@EppO EppO commented Oct 16, 2015

User.with_any_role with no args should return all User instances having at least one role.
fix #363

@EppO
Copy link
Member Author

EppO commented Oct 16, 2015

Travis-ci still fails on Mongoid specs because logs size limit (4M) gets busted. Don't know how to prevent this...

@wldcordeiro
Copy link
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)
@EppO
Copy link
Member Author

EppO commented Oct 23, 2015

Mongoid specs are failing but it's unrelated to my commit (which are AR specific). Not sure these specs are passing on master.
EDIT: confirmed. Mongoid specs are failing on master

@scheals
Copy link

scheals commented Feb 8, 2023

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.

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.

Inconsistency between has_any_role? and with_any_role
3 participants