Fixed list of donators link not including donorplus badge. #38

Merged
LogalDeveloper merged 2 commits from donator-link-patch into master 2017-10-12 22:22:07 +00:00
LogalDeveloper commented 2017-07-31 19:53:07 +00:00 (Migrated from github.com)

This patch is intended to fix #37. Here's what it changes:

  • Adds a "donors" param to /users, so /users?donors will return everyone with a donor or donorplus badge.
  • Changes the "list of users who donated" link in /donate to point to /users?donors instead of /users?badge=donor.
This patch is intended to fix #37. Here's what it changes: - Adds a "donors" param to `/users`, so `/users?donors` will return everyone with a donor or donorplus badge. - Changes the "list of users who donated" link in `/donate` to point to `/users?donors` instead of `/users?badge=donor`.
bruncbrunc (Migrated from github.com) reviewed 2017-07-31 19:57:39 +00:00
bruncbrunc (Migrated from github.com) commented 2017-07-31 19:57:39 +00:00

This will come out as We also have list of users who.... This isn't part of the issue, but if you would add an a in there, that would be great. Otherwise, as long as you've tested it and have made sure it works, I approve this.

This will come out as `We also have list of users who...`. This isn't part of the issue, but if you would add an `a` in there, that would be great. Otherwise, as long as you've tested it and have made sure it works, I approve this.
LogalDeveloper (Migrated from github.com) reviewed 2017-07-31 20:02:21 +00:00
LogalDeveloper (Migrated from github.com) commented 2017-07-31 20:02:21 +00:00

This grammar error has actually been in there for a while now. You can see it on the production server right now. Thanks for pointing this out, I'll add a fix to this pull request.

This grammar error has actually been in there for a while now. You can see it on the production server right now. Thanks for pointing this out, I'll add a fix to this pull request.
bruncbrunc (Migrated from github.com) approved these changes 2017-07-31 20:08:39 +00:00
bruncbrunc (Migrated from github.com) left a comment

Glad this is being added. Thanks.

Glad this is being added. Thanks.
jomo (Migrated from github.com) reviewed 2017-08-06 17:32:14 +00:00
jomo (Migrated from github.com) left a comment

It would be much more flexible to just use

role = Role.where(name: params[:role])
badge = Badge.where(name: params[:badge])

in the controller, then use users_path(donor: ["donor", "donorplus"]).

You might want to update the view to properly handle arrays as well (e.g. join with " and ").

It would be much more flexible to just use ```ruby role = Role.where(name: params[:role]) badge = Badge.where(name: params[:badge]) ``` in the controller, then use `users_path(donor: ["donor", "donorplus"])`. You might want to update the view to properly handle arrays as well (e.g. join with `" and "`).
LogalDeveloper commented 2017-08-11 14:02:22 +00:00 (Migrated from github.com)

That's a good idea. I'll look into doing that in a couple days.

That's a good idea. I'll look into doing that in a couple days.
LogalDeveloper commented 2017-10-12 22:20:06 +00:00 (Migrated from github.com)

Going to merge this as is for now. If we ever find a need to create more groups of badges or roles, then I will implement a better long term solution.

Going to merge this as is for now. If we ever find a need to create more groups of badges or roles, then I will implement a better long term solution.
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Redstoner/redstoner.com#38
No description provided.