miscellany 0.1.0 → 0.1.1
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: f99bdf275cebd6b213ceb58a325dc8eef2c5259fc155d8e3709d12120d2b56d0
|
4
|
+
data.tar.gz: 78af18e87095d6941e952e2a959b5081ebc690afc4f2646551a9b6018167ac26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff1325cc8b1aa570ef4b227c067b02dbc341772edd446b922cee1e69a2ed3552ea8c2a7e39b1be04a31545a7a9331f3d147c19891eb202f9cee189a1a651f0c8
|
7
|
+
data.tar.gz: 1f05be9cbf5c25558b2759c86994781b47a495f557b76416208d9f5221e71d549fec42a6f38ff967afff97bf1779df087845e92e1dd92de28f2f6a56eebb92dd
|
data/lib/miscellany.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Miscellany
|
2
|
+
module SpaRender
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
def render(*args, **kwargs)
|
6
|
+
if kwargs[:spa].present?
|
7
|
+
js_env(kwargs.delete(:env))
|
8
|
+
kwargs[:template] ||= 'miscellany/spa_page'
|
9
|
+
kwargs[:locals] ||= {}
|
10
|
+
kwargs[:locals][:pack_name] ||= kwargs.delete(:spa)
|
11
|
+
kwargs[:formats] = [:html]
|
12
|
+
super(*args, **kwargs)
|
13
|
+
else
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/miscellany/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miscellany
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan Knapp
|
@@ -256,6 +256,7 @@ extensions: []
|
|
256
256
|
extra_rdoc_files: []
|
257
257
|
files:
|
258
258
|
- README.md
|
259
|
+
- app/views/miscellany/spa_page.html.erb
|
259
260
|
- config/initializers/01_custom_preloaders.rb
|
260
261
|
- config/initializers/arbitrary_prefetch.rb
|
261
262
|
- config/initializers/cancancan.rb
|
@@ -269,6 +270,7 @@ files:
|
|
269
270
|
- lib/miscellany/controller/http_error_handling.rb
|
270
271
|
- lib/miscellany/controller/json_uploads.rb
|
271
272
|
- lib/miscellany/controller/sliced_response.rb
|
273
|
+
- lib/miscellany/controller/spa_render.rb
|
272
274
|
- lib/miscellany/param_validator.rb
|
273
275
|
- lib/miscellany/version.rb
|
274
276
|
- miscellany.gemspec
|