Created
March 30, 2012 09:24
-
-
Save assembler/2250290 to your computer and use it in GitHub Desktop.
defining default form options in simple_form
This file contains 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
module SimpleForm::ActionViewExtensions::FormHelper | |
def simple_form_for_with_defaults(record, options={}, &block) | |
# define defaults here | |
simple_form_for_without_defaults(record, options, &block) | |
end | |
alias_method_chain :simple_form_for, :defaults | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment