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: b1d491795e9f51c9bb4aba566876020a7662989a48ce86c915d047b03ed15f76
4
- data.tar.gz: bf1e538af19e4bce5a0a2f2db8b0d9ba01a609f8e353be9048a20cbac0a23112
3
+ metadata.gz: '0767296476a13311570b3747ee3d4d975ae7d73a48cfaefb409d273976034fdd'
4
+ data.tar.gz: 4fd9d994e4baf0def8c3f86f2ed2e29c52857c9133136171e0d53a6c63bd9bc5
5
5
  SHA512:
6
- metadata.gz: 9845f89fdaf2a4c9792ad6e2ca98878d73a10aed228cdbd1efb695bad0d8246ea7d8647a9f4853e179ffc37bc581a9f85c6b49b9ea482d1951a4fc8d806e4861
7
- data.tar.gz: 71a9610b7019d34b900435e76b8f7b21bb87b34ed32c97183254221e2ad00a1e1e0866fd894c43034966dbd1576e36ecc4bdc05c4c01fa70b2984ec08ffca720
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsIntestViews # :nodoc:
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  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.1
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