Sha256: 545f9171ba3f2fcd09f7c1bd4f6e4f0535bce388bb3d8b26d6eb5168e71dd8f4
Contents?: true
Size: 566 Bytes
Versions: 1
Compression:
Stored size: 566 Bytes
Contents
# This class is only used for testing purposes. class FakeObject include ActiveModel::Validations def self.serialize(*) ; end def self.before_save(*) ; end attr_accessor :title_translations, :description_translations, :summary_translations # Has to be set in this context to test it correctly I18n.available_locales = [:en, :de, :'en-GB'] include SerialTranslator serial_translator_for :title, :description, :summary validates :title, serial_translator: { length: 5..25 } validates :description, serial_translator: { presence: true } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
serial_translator-0.0.4 | spec/support/fake_object.rb |