-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
Hydra::Presenter#to_model
delegation with self
Beginning in `v3.5.1`, `SimpleForm::FormBuilder` calls `#to_model` (via ActionView's `#convert_to_model`) in its initializer. This prevents `Hydra::Presenter` inheritors from being used correctly when sent to the form. Replacing the delegated method with one that returns `self` restores the correct behavior to `SimpleForm::FormBuilder` and related view helpers. Client code can still access the model by calling the `#model` accessor. Fixes #139.
- Loading branch information
Tom Johnson
committed
Mar 5, 2018
1 parent
78ea076
commit f523e17
Showing
2 changed files
with
10 additions
and
5 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