mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
Necessary to define the primary contract for the appliction in which all contracts can inherit from. This allows us to configure all contracts and behaves a lot like how actions and views are configured. Issue: 257 Milestone: minor
14 lines
328 B
Ruby
14 lines
328 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "refinements/pathname"
|
|
|
|
module Terminus
|
|
# Defines user create contract.
|
|
class Contract < Dry::Validation::Contract
|
|
using Refinements::Pathname
|
|
|
|
config.messages.backend = :i18n
|
|
config.messages.load_paths.merge Hanami.app.root.join("config/locales").files("*.yml")
|
|
end
|
|
end
|