Sha256: 6010be2004b812b05e2c82f7b87f249b66e5bc4579bcce7fd0679c8174ada012

Contents?: true

Size: 404 Bytes

Versions: 4

Compression:

Stored size: 404 Bytes

Contents

module Trax
  module Controller
    module Authorization
      module Pundit
        module Actions
          module Update
            extend ::ActiveSupport::Concern

            def update_resource(object, attributes={})
              object.assign_attributes(*attributes)
              authorize(object)
              object.save
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trax_controller-1.0.0 lib/trax/controller/authorization/pundit/actions/update.rb
trax_controller-0.1.4 lib/trax/controller/authorization/pundit/actions/update.rb
trax_controller-0.1.3 lib/trax/controller/authorization/pundit/actions/update.rb
trax_controller-0.1.2 lib/trax/controller/authorization/pundit/actions/update.rb