Skip to content

Commit

Permalink
Include the request_type when creating a retirement request
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Jul 30, 2018
1 parent 12b109c commit 3ce32d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/models/mixins/retirement_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ module RetirementMixin

module ClassMethods
def make_retire_request(*src_ids)
options = {:src_ids => src_ids.presence || id}
(name.demodulize + "RetireRequest").constantize.make_request(nil, options, User.current_user, true)
klass = (name.demodulize + "RetireRequest").constantize
options = {:src_ids => src_ids.presence || id, :__request_type__ => klass.request_types.first}
klass.make_request(nil, options, User.current_user, true)
end

def retire(ids, options = {})
Expand Down

0 comments on commit 3ce32d9

Please sign in to comment.