merit 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/merit_action.rb +2 -2
- metadata +1 -1
data/app/models/merit_action.rb
CHANGED
@@ -40,8 +40,8 @@ class MeritAction < ActiveRecord::Base
|
|
40
40
|
# Action's target object
|
41
41
|
def target_object(model_name = nil)
|
42
42
|
# Grab custom model_name from Rule, or target_model from MeritAction triggered
|
43
|
-
klass = model_name || target_model
|
44
|
-
klass.camelize.constantize.find_by_id(target_id)
|
43
|
+
klass = model_name || target_model
|
44
|
+
klass.singularize.camelize.constantize.find_by_id(target_id)
|
45
45
|
end
|
46
46
|
|
47
47
|
# Mark merit_action as processed
|