glib-web 0.4.27 → 0.4.28
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6a3cfc5aa497d164cd2a9d3fa9cbf84139efc72
|
4
|
+
data.tar.gz: 47bb3347a4badb510e3ae751aa67e10aef774144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98f020bd692f63eee47654671e5f8a764ef50eba9a7be389acce7f3a4cf15528b0161c4898ca3a049f741ba0c0a27c3b330ad91abc301fbb56af24213c597cc9
|
7
|
+
data.tar.gz: dd3c1bc65805647228d853345450be6cf6dad94018601831ca851ca7f3ee5a8e54c5be1a767338531925514063a4f811c55d5bbd027852de18cb148836927a94
|
@@ -39,8 +39,8 @@ module Glib::Json::Libs
|
|
39
39
|
def json_ui_render(template, args = {})
|
40
40
|
JSON.parse(render_to_string(template, locals: args))
|
41
41
|
end
|
42
|
-
|
43
|
-
def
|
42
|
+
|
43
|
+
def glib_force_json_ui
|
44
44
|
if params[:_render] != 'v1'
|
45
45
|
redirect_to url_for(params.to_unsafe_h.merge(_render: 'v1'))
|
46
46
|
end
|
@@ -81,7 +81,7 @@ module Glib::Json::Libs
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def json_libs_force_json_ui
|
84
|
-
before_action :
|
84
|
+
before_action :glib_force_json_ui
|
85
85
|
end
|
86
86
|
|
87
87
|
def json_libs_rescue_csrf
|
@@ -138,7 +138,7 @@ module Glib
|
|
138
138
|
# TODO: try disabling this
|
139
139
|
# options = options.reverse_merge(width: 'matchParent')
|
140
140
|
|
141
|
-
[:padding, :backgroundColor, :width, :height
|
141
|
+
[:padding, :backgroundColor, :width, :height].each do |name|
|
142
142
|
if (value = options.delete(name))
|
143
143
|
json.set! name, value
|
144
144
|
end
|