Sha256: 9a24710c9a858948a5152cf2e4e7c57d60b41901b378e5962778c5a07e65c2b4

Contents?: true

Size: 278 Bytes

Versions: 3

Compression:

Stored size: 278 Bytes

Contents

# frozen_string_literal: true

module Comments
  class CreateAction < ApplicationAction
    expose :comment

    def perform(input)
      if input.valid?
        @comment = CommentRepository.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/comments/create_action.rb
upgrow-0.0.4 test/dummy/app/actions/comments/create_action.rb
upgrow-0.0.3 test/dummy/app/actions/comments/create_action.rb