Created
March 20, 2017 16:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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