Skip to content

Instantly share code, notes, and snippets.

@alexslade
Created March 20, 2017 16:32
class AlbumForm < Reform::Form
property :title, prerender: ->(options) { self.title = options[:def_title] }
end
You can then pass arbitrary arguments to prerender!.
###
form.title #=> nil
form.prerender!(def_title: "Roxanne")
form.title #=> "Roxanne"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment