Sha256: dbcee73786cb01c141f573b252f946e6cd6539e5e0c7a5812d0a0c158d487654
Contents?: true
Size: 468 Bytes
Versions: 1
Compression:
Stored size: 468 Bytes
Contents
class MainModelModel include TransForms::MainModel end class ProxyModel class_attribute :main_model self.main_model = :user include TransForms::MainModel::Proxy end class UserUpdater < TransForms::FormBase set_main_model :user attribute :name, String validates :name, presence: true transaction do user.attributes = { name: name } user.save! end end class UserProxyModel < TransForms::FormBase set_main_model :user, proxy: true end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trans_forms-0.1.0 | spec/support/trans_forms/main_model_forms.rb |