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.
Files changed (2) hide show
  1. data/app/models/merit_action.rb +2 -2
  2. metadata +1 -1
@@ -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.singularize
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: