Skip to content

Commit

Permalink
Fix call for future retirement
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed May 7, 2018
1 parent 2aba99c commit 2af71be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/mixins/retirement_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module RetirementMixin
module ClassMethods
def make_retire_request(*src_ids)
options = {:src_ids => src_ids.presence || id}
(name + "RetireRequest").constantize.make_request(nil, options, User.current_user, true)
(name.demodulize + "RetireRequest").constantize.make_request(nil, options, User.current_user, true)
end

def retire(ids, options = {})
Expand Down Expand Up @@ -122,7 +122,7 @@ def retirement_check
end
end

make_retire_request if retirement_due?
self.class.make_retire_request(self.id) if retirement_due?
end

def retire_now(requester = nil)
Expand Down

0 comments on commit 2af71be

Please sign in to comment.