Sha256: d63874c7c1301ce3a0444d6c00231a2096f139475606c5835e02c4a8b79af0d1

Contents?: true

Size: 270 Bytes

Versions: 2

Compression:

Stored size: 270 Bytes

Contents

# frozen_string_literal: true

class ActionNotAllowedSerializer
  def initialize(error)
    @error = error
  end

  def serialize
    {
      success: false,
      errors: [I18n.t(:not_allowed, scope: %i[errors action])]
    }
  end

  private

  attr_reader :error
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
n_base_rails-0.1.2 lib/serializers/action_not_allowed_serializer.rb
n_base_rails-0.1.1 lib/serializers/action_not_allowed_serializer.rb