Skip to content

Beth's World (Stuff We Want)

bethesque edited this page Nov 7, 2014 · 8 revisions
  • property :getter should be considered in Form#new when populating from the model - this saves from using an intermediant object and provides a place to "implement" form-specific scopes and queries.
  • :readonly/writeable: false to not even read a submitted value in validate (:virtual still assigns the value to the form, but doesn't write it).
  • Make :empty, :virtual etc better understandable. It confuses us.
  • Swap property and :as back around (Beth: I will have a look at the code to see if I can do a quick PR, but pact takes up pretty much all of my spare dev time)
  • Allow manual return mappings to the model without having to do a dirty override of sync - overrideable post_sync method or some other way to achieve this goal. :setter might work.
  • The option for embedding a contract inside another contract should be :contract not :form
class SomeContract < Reform::Contract

  property :child, contract: ChildContract
        
end
  • Readonly, writeonly, virtual

 photo reform_zps7da0db81.jpg