Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Katsuya Noguchi's Profile

GitHub User: katsuyan

Site: www.katsuyan.me

Comments by Katsuya Noguchi

Avatar

It looks like you are calling add_evaluation on nil value. You should make sure the variable does not have nil value.

Avatar

With activerecord-reputation-system 1.3.0,

You can use evaluated_by method to do this.

e.g.

ruby
Haiku.evaluated_by(:votes, @user)

will return all Haiku instances that are evaluated by @user.