-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In some cases reform is just used for coercion & validation without any persistence done. In these cases it was advised to use nil as reform model & to mark all properties as virtual. this works fine, however fails as .persisted? is called on nil upon rendering in actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:388 ... as = options[:as] action, method = object.respond_to?(:persisted?) && object.persisted? ? [:edit, :put] : [:new, :post] options[:html].reverse_merge!( :class => as ? "#{action}_#{as}" : dom_class(object, action), :id => as ? "#{action}_#{as}" : [options[:namespace], dom_id(object, action)].compact.join("_").presence, :method => method ) ...
- Loading branch information
Pieter Vanmeerbeek
committed
Jul 15, 2016
1 parent
773a4bf
commit c1974e1
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
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