Update docs with correct view paths #387
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #202
Problem:
The documentation states that views will be generated in the
app/views/administrate/
directory, but they are actually generated inapp/views/admin/
.Solution:
(as stated in #202)
In fact, both paths work correctly for overriding views.
Rails looks up views based on the inheritance tree of your controllers. In this case, our inheritance tree looks like:
... so Rails will look for views in:
app/views/admin/customers
,THEN
app/views/admin/application
, THENapp/views/administrate/application
.In the future, we'd like to support multiple admin dashboards in the same application, by nesting them under different namespaces (e.g.
app/views/admin
andapp/views/super_admin
). In that case, views underapp/views/administrate
would apply to all of the admin dashboards. Views underapp/views/admin
would only apply to the dashboard at the/admin
route, and wouldn't affect the dashboard at/super_admin
.Because of this, we'd prefer to keep the generated views in
/admin
. We'll keep the current implementation, and update the documentation.