Sha256: 2989622f6988655a003173d9233b150dc130e4855a28d67eb4d6fd90d8f84f77

Contents?: true

Size: 271 Bytes

Versions: 3

Compression:

Stored size: 271 Bytes

Contents

# frozen_string_literal: true

module Articles
  class CreateAction < UserAction
    expose :article

    def perform(input)
      if input.valid?
        @article = ArticleRepository.new.create(input)
      else
        failure(input.errors)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
upgrow-0.0.5 test/dummy/app/actions/articles/create_action.rb
upgrow-0.0.4 test/dummy/app/actions/articles/create_action.rb
upgrow-0.0.3 test/dummy/app/actions/articles/create_action.rb