The merit ruby gem is not adding the points to the user with the "user.passion.present" added. It works without it. I set everything up with working with Devise and Merit gems. Everything seems to work except this.
module Merit
class PointRules
include Merit::PointRulesMethods
def initialize
score 50, :on => 'user/registrations#create', model_name: 'User'
score 10, :on => 'user/registrations#update', model_name: 'User' do |user|
user.passion.present?
end
#
# score 15, :on => 'reviews#create', :to => [:reviewer, :reviewed]
#
# score 20, :on => [
# 'comments#create',
# 'photos#create'
# ]
score 20, on: 'lyrics#create', to: :user, description: 'Plus 20 points'
score (-20), on: 'lyrics#destroy', to: :user
end
end
end