Sha256: 8f7e9385a11aff9be0f31a5a829fea8330fbf9b200f7ed8a90b83dd63581224a

Contents?: true

Size: 314 Bytes

Versions: 8

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

module PUNK
  class ShowUserAction < Action
    args :user

    def validate
      validates_not_null :user
      validates_not_empty :user
      return if user.blank?
      validates_type User, :user
    end

    def process
      present ShowUserView, user: user
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
punk-0.4.1 lib/punk/actions/users/show.rb
punk-0.3.6 lib/punk/actions/users/show.rb
punk-0.3.5 lib/punk/actions/users/show.rb
punk-0.3.4 lib/punk/actions/users/show.rb
punk-0.3.3 lib/punk/actions/users/show.rb
punk-0.3.2 lib/punk/actions/users/show.rb
punk-0.3.1 lib/punk/actions/users/show.rb
punk-0.2.0 lib/punk/actions/users/show.rb