Skip to content

Release 2.14

The following changes have been prepared and implemented.

Configuration

Improved action_shortcuts

Added support for extended mode for the action_shortcuts option.

ruby
configuration do
  action_shortcuts(
    {
      restrict: {             # replacement for make
        prefix: :create,      # method name prefix
        suffix: :restriction  # method name suffix
      }
    }
  )
end
ruby
class PaymentsService::Restrictions::Create < ApplicationService::Base
  input :payment, type: Payment

  # The exclamation mark will be moved to the end of the method name
  restrict :payment!

  private

  def create_payment_restriction!
    inputs.payment.restrictions.create!(
      reason: "Suspicion of fraud"
    )
  end
end

Ruby

Support for Ruby 3.5 Preview 1 has been verified.

Support for Ruby 3.1 has been removed.