• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NZOI / nztrain / 986
38%

Build:
DEFAULT BRANCH: master
Ran 27 Apr 2020 12:38PM UTC
Jobs 1
Files 153
Run time 20s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
986

push

travis-ci

web-flow
Fix type mismatch when checking :by_user URL parameter (#115)

params[:by_user] is usually a string, which will never compare equal
to current_user.id (an integer).

The main effect is that non-staff users weren't authorized to view
/submissions/by_user/:user_id/by_problem/:problem_id even when
:user_id was their own ID. Also, some of the UI messages were wrong
(e.g. "No submissions found" instead of "You have no submissions").

Use params[:by_user].to_i when comparing to current_user.id.

(Note: `params[:by_user] == current_user.id.to_s` almost works but can
produce incorrect results if params[:by_user] has leading zeros.)

Also, store a string in params[:by_user] when the route is
/submissions/my for consistency.

2325 of 7016 relevant lines covered (33.14%)

4.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 986.1 (2.3.8) 27 Apr 2020 12:38PM UTC 0
33.14
Travis Job 986.1
Source Files on build 986
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #986
  • 526752e1 on github
  • Prev Build on master (#985)
  • Next Build on master (#987)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc