timriley on support-component-dirs-with-mixed-namespaces
Avoid freezing components Thes… Add dirs to load path so earlie… Extract Identifier; support mix… (compare)
timriley on support-component-dirs-with-mixed-namespaces
Fix space (compare)
timriley on support-component-dirs-with-mixed-namespaces
Support component dirs with mix… Add test Refactor component building int… and 30 more (compare)
dry-bot on master
[devtools] sync (compare)
require 'i18n'
require 'cell/translation'
require 'reform/form/dry'
require 'disposable/twin/coercion'
en:
errors:
in_possession?: 'is not in possession of deviation'
is_conversion_correct?: 'is incorrectly converted from P to $'
not_blank?: 'is blank'
rules:
auction:
autobuy_amount_is_above_start_bid?: 'must be greater than start bid'
currency_accepted?: 'select at least one currency'
is_conversion_correct?: 'is incorrectly converted from P to $'
bid:
is_no_self_bid?: 'must not bid on own auction'
is_running?: 'is not running'
unique?: 'must be unique'
directly under errors:
. I did not make sure however to put the i18 before dry-v.
Dry::Validation::MissingMessageError: message for unique? was not found
configure do
config.messages = :i18n
config.namespace = :bid
config.predicates = Dagavel::Predicates
option :form
def is_no_self_bid?( user )
user.id != form.auction.user_id
end
def is_running?( auction )
auction.is_running?
end
end
# tell the I18n library where to find your translations
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
# set default locale to something other than :en
I18n.default_locale = :en