templates-rails 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/app/controllers/templates/templates_controller.rb +2 -2
- data/lib/templates/version.rb +1 -1
- metadata +3 -3
- /data/app/views/templates/{index.html.erb → templates/index.html.erb} +0 -0
- /data/app/views/templates/{nested_index.html.erb → templates/nested_index.html.erb} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9a04898081b6a1962d47d73e9d1e1a328e10dc957135808f8da06335fd3a43b
|
|
4
|
+
data.tar.gz: 770942c7484c6174911b7e4653c2f32bbfdfc63d5f0c296e710b717ed29c1c7f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b99c74fc2347ef62109b75abb0f660a189dbafa9cff3a1c1d5346ad32c309326b883e6d3ac24792ed938408195b1543f1bab8c96aaf332a42780fb8f85f0a9dc
|
|
7
|
+
data.tar.gz: f343e9a9d4900b4fb5df9135400646615e82a8b5da5159dd020b83fdf828cfc6a005a72eb1212eb579d3c2996253281a225ab565df280d497fac7d6b156079f7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 0.2.1 - 07-05-2026
|
|
4
|
+
* **Bug fix**: Move the engine's bundled `index` and `nested_index` views from `app/views/templates/` to `app/views/templates/templates/` (matching the namespaced `Templates::TemplatesController` view path). Host apps with their own `app/views/templates/` views were shadowing the engine's templates, causing `MissingTemplate` errors at the engine root. No host-app changes are needed — Rails resolves the views via the controller's natural lookup path.
|
|
5
|
+
|
|
3
6
|
### 0.2.0 - 07-05-2026
|
|
4
7
|
* **Breaking**: `TemplatesController` is now namespaced as `Templates::TemplatesController` to avoid collisions with controllers of the same name in host apps. Routes inside the engine point at `templates/templates#index` / `templates/templates#show` automatically; no host-app changes are needed unless you reference the controller class directly.
|
|
5
8
|
* Added `Templates.mount_at` (default `/templates`) — configures the auto-mount path
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module Templates
|
|
2
2
|
class TemplatesController < Templates.parent_controller.constantize
|
|
3
3
|
def index
|
|
4
|
-
render template: 'templates/index', layout: 'templates/index'
|
|
4
|
+
render template: 'templates/templates/index', layout: 'templates/index'
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def show
|
|
8
8
|
if params[:id].present? && File.directory?("./app/views/#{Templates.views_path}/#{params[:id]}")
|
|
9
|
-
render template: 'templates/nested_index', layout: 'templates/index'
|
|
9
|
+
render template: 'templates/templates/nested_index', layout: 'templates/index'
|
|
10
10
|
else
|
|
11
11
|
render "#{Templates.views_path}/#{params[:id]}", layout: 'templates/show'
|
|
12
12
|
end
|
data/lib/templates/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: templates-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lukasz Czapiewski
|
|
@@ -45,8 +45,8 @@ files:
|
|
|
45
45
|
- app/controllers/templates/templates_controller.rb
|
|
46
46
|
- app/views/layouts/templates/index.html.erb
|
|
47
47
|
- app/views/layouts/templates/show.html.erb
|
|
48
|
-
- app/views/templates/index.html.erb
|
|
49
|
-
- app/views/templates/nested_index.html.erb
|
|
48
|
+
- app/views/templates/templates/index.html.erb
|
|
49
|
+
- app/views/templates/templates/nested_index.html.erb
|
|
50
50
|
- config/routes.rb
|
|
51
51
|
- lib/install/templates.rb
|
|
52
52
|
- lib/tasks/templates_tasks.rake
|
|
File without changes
|
|
File without changes
|