dhappy/crowdfund — pull request #4 by mamadoutoure (2014-03-12 01:09:09+00:00)
Title: Assigning automatically the bidder and the issue_id to a bid + some minor fixes

1 - I fixed the automatic assignment of user and issue ids to when creating a bid

2 - I made some changes wherever a raw object was displayed to get the id or the description
3 - I made also a change on leading_bid method (which was returning a first bids of an issue as an object), to return now the id of the first bid (I made it like that in order just to have something displayable), maybe you want to return the count of the bids in this issue, if so, let me know

def lead_bid
# bids.first
bid_first = bids.first
bid_first.nil? ? nil : bid_first[:id]
end