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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8835d236e6b5565a4fb05f611bc3b928ec3951e30a0655c5878811f5e7959733
4
- data.tar.gz: 23a874db1a1146504e3c4f2a138888a615b2890d115949bc5b3e6c133ca180f5
3
+ metadata.gz: e9a04898081b6a1962d47d73e9d1e1a328e10dc957135808f8da06335fd3a43b
4
+ data.tar.gz: 770942c7484c6174911b7e4653c2f32bbfdfc63d5f0c296e710b717ed29c1c7f
5
5
  SHA512:
6
- metadata.gz: 306f125d7b567cd6beebabbf014adb64c1a2d8b322696c6343b49a17c920817c76ac69eaf8e41d1964ee0b4c24d473e7929e63061ed83ec4495831b0e9c66d66
7
- data.tar.gz: 1f945793eecf89b852beab079d36bb8e3d56b5ec7d6a4f1554912bba2d69ae49ca2cc5427da6493690ed5cf081119e76731bb564b0881fcf5aff4d020b63292a
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
@@ -1,3 +1,3 @@
1
1
  module Templates
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
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.0
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