Cleanup controllers, helpers, views, models

What this does
---
 - Initial Cleanup, see in line comments
Alright, thanks for the tip.
On Jun 17, 2014 8:23 PM, "Julian Nadeau" <notifications@github.com> wrote:

> In app/models/picture.rb:
>
> > -	# def first_beat_second(picA,picB)
> > -	# 	ea = expected_first_beats_second(picA,picB)
> > -	# 	picA.rating += 50*(1-ea)
> > -	# 	picB.rating += 50*(-(1-ea))
> > +  def beats(loser)
> > +    if self.id == loser.id
> > +      puts "whaaat"
> > +      return nil
> > +    end
> > +    ea = 1/(1+10**((loser.rating-self.rating)/400))
> > +    self.rating += 50*(1-ea)
> > +    loser.rating += 50*(-(1-ea))
> > +    self.save
> > +    loser.save
> > +  end
> > +#  	def expected_first_beats_second(first, second)
>
> Relevant for most spots. If you have to comment, there's probably a
> problem with the code.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nathantempelman/PhotoKombat/pull/3/files#r13894296>.
>