Sha256: df23f8fc5c647ba2a3eb586a430f16c8dff957d2813c69bfb5529f17c4a58210

Contents?: true

Size: 529 Bytes

Versions: 23

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

module Azeroth
  class RequestHandler
    # @api private
    #
    # hadler for requests for new resources
    class New < RequestHandler
      private

      # @private
      #
      # returns a new empty instance of the model
      #
      # the initialization of the model uses the collection
      # so that any attribute related to the collection
      # will be present
      #
      # @return [Object]
      def resource
        controller.send(model.plural).new
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
azeroth-1.0.0 lib/azeroth/request_handler/new.rb
azeroth-0.10.1 lib/azeroth/request_handler/new.rb
azeroth-0.10.0 lib/azeroth/request_handler/new.rb
azeroth-0.9.0 lib/azeroth/request_handler/new.rb
azeroth-0.8.2 lib/azeroth/request_handler/new.rb
azeroth-0.8.1 lib/azeroth/request_handler/new.rb
azeroth-0.8.0 lib/azeroth/request_handler/new.rb
azeroth-0.7.4 lib/azeroth/request_handler/new.rb
azeroth-0.7.3 lib/azeroth/request_handler/new.rb
azeroth-0.7.2 lib/azeroth/request_handler/new.rb
azeroth-0.7.1 lib/azeroth/request_handler/new.rb
azeroth-0.7.0 lib/azeroth/request_handler/new.rb
azeroth-0.6.5 lib/azeroth/request_handler/new.rb
azeroth-0.6.4 lib/azeroth/request_handler/new.rb
azeroth-0.6.3 lib/azeroth/request_handler/new.rb
azeroth-0.6.2 lib/azeroth/request_handler/new.rb
azeroth-0.6.1 lib/azeroth/request_handler/new.rb
azeroth-0.6.0 lib/azeroth/request_handler/new.rb
azeroth-0.5.0 lib/azeroth/request_handler/new.rb
azeroth-0.4.0 lib/azeroth/request_handler/new.rb