Comments (4)
After doing more searching, this is intended behavior when config.action_view.prefix_partial_path_with_controller_namespace = true
(true
by default).
This change was introduced in March of 2012 as part of #5625.
I'm considering two resolutions:
- catch this particular source of
ActionView::Template::Error
, check for the presence ofmodels/_model.html.erb
. If the file exists, change the error message to mention theconfig.action_view.prefix_partial_path_with_controller_namespace
configuration) - add
models/
as a lookup context prefix (in addition toscoped/models/
), then attempt to gracefully fall back to the unscoped model partial.
As a consumer of Action View, my intuition is that the lookup would fallback, in the same way that a controller that inherits from ApplicationController
could define its own view, then rely on fallback to render an app/views/application
partial.
@rafaelfranca do either of those options seem viable?
from rails.
- add
models/
as a lookup context prefix (in addition toscoped/models/
), then attempt to gracefully fall back to the unscoped model partial.
I've opened #50852 to explore this option.
from rails.
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 7-1-stable
branch or on main
, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.
from rails.
I've opened #50852 to resolve this issue, and someone from Core has expressed interest in the PR.
from rails.
Related Issues (20)
- [Bug][Railties] Generating scaffold don't apply tailwindcss template if rails new command with '--css=tailwind --javascript=esbuild' HOT 2
- postgresql hstore column not working with schema dump and rspec HOT 3
- Can't use ActiveRecord::Base.connection to check the existence of the DB in Rails 7.2.1 HOT 2
- ActionText adding a spurious `content: ''` to rich text attachments causing them to not preview in the editor HOT 1
- Time.find_zone has inconsistent behavior between mac and linux environments for "America/Indianapolis" HOT 3
- Make it possible for ConnectionPool#disconnect to avoid reconnection HOT 1
- Syntax error on first db:migrate after upgrading to rails 6 HOT 4
- Multiple rate-limits share same cache key so it increments multiple time for single request
- UniquenessValidator raises error when used on singleton class HOT 13
- Errors reported when ActionMailer emails are sent via ActiveJob do not filter mailer params, potentially leak sensitive data HOT 9
- Mapping column manually like type/class to c_type/c_class HOT 4
- "Cannot expire connection, it is owned by a different thread" in Rails 7.2 tests HOT 4
- Rails console reload! command HOT 3
- Precision and scale not detected for custom DOMAIN types [PostgreSQL]
- Fresh Rails project contains rubocop linter violation
- ActionCable stream_from handlers not called in test
- Bug in generated Dockerfile when using ruby preview versions HOT 2
- Remove deprecated code
- HashWithIndifferentAccess#deep_stringify_keys vs non-string keys HOT 4
- # Contributor Code of Conduct The Rails team is committed to fostering a welcoming community. **Our Code of Conduct can be found here**: https://rubyonrails.org/conduct For a history of updates, see the page history here: https://github.com/rails/website/commits/main/_pages/conduct.html
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.