Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Required for anonymous struct of cross_sell products.
- require 'disposable/twin/struct' # Disposible version 0.4.3.
- # Contract for validating input for sending an auto email.
- class Email::ThankYou::Auto::Contract < Reform::Form # Reform version: 2.2.4
- # Included for cross_sell to construct itself.
- include Disposable::Twin::Property::Struct
- property :username, virtual: true
- validates :username, presence: true
- property :password, virtual: true
- validates :password, presence: true
- # Tried replacing "Struct" with "OpenStruct", "Array", "Hash", etc.
- collection :cross_sell, virtual: true, field: :hash, populate_if_empty: Struct do
- property :product, virtual: true
- property :enabled, virtual: true
- property :url, virtual: true
- end
- end
Add Comment
Please, Sign In to add comment