-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ActiveModel::Conversion._to_partial_path not using a model's mode…
…l_name. The current implementation of _to_partial_path composes the part of two bits, `collection' and `element'. ActiveModel::Name also contains these fields, and they are derived the same way _to_partial_path does it. However, _to_partial_path doesn't use the information in model_name, and solely relies on its own computations instead. This works for all standard cases, but not necessarily for models that provide a non-standard model_name. This commit fixes that and has _to_partial_path use model_name if the class responds to it.
- Loading branch information
1 parent
0d46f69
commit 3a3951a
Showing
3 changed files
with
20 additions
and
1 deletion.
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
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