easy_swagger_ui 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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb69bf4054ea2258df60e3bad3c85a706a053833
|
4
|
+
data.tar.gz: dfe40a699efc3003da6d41be36c9e7f3b1e9acc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 235135a74376c13f3f14f97410db0a13fc4dd4aa45ba1d069f46f940cdade3bf7b8242a52b7ed9cf29efbb65ce619bf21186fe27a880d9dc85ca8bce57c8a37b
|
7
|
+
data.tar.gz: d675885f1618286fa70c2558c9011972f1f7c21758ac5a15b8a3d977c3ee6df45b3f14deacf91fead54cb37d49f4ce08bf4bd29445faa290a7c36ab01c504877
|
data/CHANGELOG.md
CHANGED
@@ -3,5 +3,13 @@ module EasySwaggerUi
|
|
3
3
|
def swagger_routes
|
4
4
|
Engine.routes.url_helpers
|
5
5
|
end
|
6
|
+
|
7
|
+
def asset_available?(path)
|
8
|
+
if Rails.configuration.assets.compile
|
9
|
+
Rails.application.precompiled_assets.include?(path)
|
10
|
+
else
|
11
|
+
Rails.application.assets_manifest.assets[path].present?
|
12
|
+
end
|
13
|
+
end
|
6
14
|
end
|
7
15
|
end
|
@@ -13,12 +13,11 @@
|
|
13
13
|
<%= javascript_include_tag "easy_swagger_ui/application" %>
|
14
14
|
|
15
15
|
<%
|
16
|
-
|
17
|
-
translation = Rails.application.assets.find_asset(asset_name)
|
16
|
+
translation_js = "easy_swagger_ui/lang/#{I18n.locale.to_s.downcase}.js"
|
18
17
|
%>
|
19
|
-
<% if
|
18
|
+
<% if asset_available?(translation_js) %>
|
20
19
|
<%= javascript_include_tag "easy_swagger_ui/lang/translator" %>
|
21
|
-
<%= javascript_include_tag
|
20
|
+
<%= javascript_include_tag translation_js %>
|
22
21
|
<% end %>
|
23
22
|
|
24
23
|
<script type="text/javascript">
|