rails-intest-views 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0767296476a13311570b3747ee3d4d975ae7d73a48cfaefb409d273976034fdd'
|
4
|
+
data.tar.gz: 4fd9d994e4baf0def8c3f86f2ed2e29c52857c9133136171e0d53a6c63bd9bc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 901f9f318f2d3d85dcf8cf2994bff3a8df3b3a9cc8b27a6ce39896b6ca73143cf63db798bb4fab6e44f4656009c8c253b3a0b45c815a1fd7ad6925e1b6fd3894
|
7
|
+
data.tar.gz: 1d36b710218e6b34554ab454ce0163c7a849ed3f97048a1a4bfea162d4c5c17be0f8bac3a747a57cdf5e926a1945b7d9f5071d75e3f6ce4a5eaa3b79f6a606f7
|
@@ -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.0.2
|
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
|