I had looked at using `User.with_any_roles` but that creates one User query per role passed. Which is not ideal, given that we want to have an ActiveRecord::Relation object on which we'd paginate. This adjustment does it's best to mimic Forem's role structure and adhear to how Rolify builds the underlying query. An astute reader will notice that in these specs we use `role: "admin"` and `roles: ["Admin"]`; the primary reason relates the user interface being worked on in forem/forem#17884. It is my understanding that the `role` approach and `roles` approach will be separated by a feature flag (we're rolling out the `roles` approach). Related to - forem/forem#17491 - forem/forem#17884 |
||
|---|---|---|
| .. | ||
| acts_as_taggable_on | ||
| constants | ||
| honeycomb | ||
| middlewares | ||
| redcarpet/render | ||
| reverse_markdown/converters | ||
| api_constraints.rb | ||
| app_secrets.rb | ||
| black_box.rb | ||
| html_css_to_image.rb | ||
| menu.rb | ||
| rails_env_constraint.rb | ||
| release_phase_notifier.rb | ||
| seeder.rb | ||
| string_attribute_cleaner.rb | ||
| throttled_call.rb | ||
| url.rb | ||