rails-intest-views 0.0.1 → 0.1.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f1c5b45aa3ca9ad07771ada2aefbf51872dde130890102d4ea8549364e48834
|
4
|
+
data.tar.gz: f5b8a0c5b64eb11ef0e7d3a39dbdd0cbf51f71e3b2a3414089bdd6534ba48485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d6a5c0a6f07e4c4e1e0be853032a8b6610083d6231b8b36507c85ff6efc77a21bd7f4a8a7bf7848cfff2da1e2b3a3c1201dc37180781005cf37c332ffb9779a
|
7
|
+
data.tar.gz: ef9f23793df6a00b57d4a4f2f8928191ebd017c7d753c996aeeb5a2fe98d8be0b3595280aef21d3c560244e3f033c95a55819bb96fcd9c9e511757f0818e5962
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsIntestViews
|
4
|
+
class TemplatesController < ActionController::Base
|
5
|
+
def show
|
6
|
+
template_config = RailsIntestViews.find(params[:id])
|
7
|
+
|
8
|
+
return head :not_found unless template_config
|
9
|
+
|
10
|
+
params = {
|
11
|
+
inline: template_config[:template],
|
12
|
+
layout: RailsIntestViews.config.default_layout
|
13
|
+
}
|
14
|
+
|
15
|
+
params[:layout] = template_config[:layout] if template_config.key?(:layout)
|
16
|
+
|
17
|
+
render(**params)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-intest-views
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- CHANGELOG.md
|
105
105
|
- LICENSE.txt
|
106
106
|
- README.md
|
107
|
+
- app/controllers/rails_intest_views/templates_controller.rb
|
107
108
|
- lib/rails-intest-views.rb
|
108
109
|
- lib/rails-intest-views/capybara_helpers.rb
|
109
110
|
- lib/rails-intest-views/engine.rb
|