ZeusWPI/gamification

View on GitHub
app/helpers/bounties_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
module BountiesHelper
  def find_bounty(issue, issuer)
    bounty = issue.unclaimed_bounties.find { |b| b.issuer == issuer }
    bounty = issue.bounties.build(value: 0) unless bounty
    bounty
  end
end