Read about our upcoming Code of Conduct on this issue

update_service.rb 219 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
module Badges
  class UpdateService < Badges::BaseService
    # returns the updated badge
    def execute(badge)
      if params.present?
        badge.update_attributes(params)
      end

      badge
    end
  end
end