merit 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|