edgarj 0.01.28 → 0.01.29
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 +4 -4
- data/app/helpers/edgarj/common_helper.rb +10 -1
- data/app/views/edgarj/popup/index.js.erb +1 -1
- data/lib/edgarj/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d5e9825ef6ec78aadf69f42ed50058dce4a39dd1
|
|
4
|
+
data.tar.gz: 10de985a13ab7162942803d38437352d338dfefd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5372bf5525f803339c36f7fc11cea3091db72b6300de356bb1a8c5a426cb8338d5a94bd6c1d7e82fa15805ed3dce81972693283a849762985bf670a25ed2f497
|
|
7
|
+
data.tar.gz: 3de666c3b19d419d10f670a9a2aeb6b86233f6fc909295a5f028fc09c0b8f8ce73d2c11825d16db5ee94e80440a98c41bdc4b6d3ef5edf6782ec8eccbb3518a1
|
|
@@ -34,8 +34,17 @@ module Edgarj
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# model label with the following fallback order:
|
|
38
|
+
# 1. t('view.CONTROLLER.model') if exists.
|
|
39
|
+
# 1. model.human_name
|
|
40
|
+
def model_label
|
|
41
|
+
@controller_model ||= controller.send(:model)
|
|
42
|
+
I18n.t("view.#{controller_path}.model",
|
|
43
|
+
default: @controller_model.human_name)
|
|
44
|
+
end
|
|
45
|
+
|
|
37
46
|
# column label with the following fallback order:
|
|
38
|
-
# 1. t('view.CONTROLLER.
|
|
47
|
+
# 1. t('view.CONTROLLER.MODEL.COLUMN') if exists.
|
|
39
48
|
# 1. model.human_attribute_name(col.name)
|
|
40
49
|
#
|
|
41
50
|
# @param col_or_sym [Column, String, or Symbol]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$('#edgarj_form_popup').html("<%= j(render 'index') %>");
|
|
2
2
|
$('#edgarj_form_popup').dialog('option', 'title',
|
|
3
|
-
'<%= t('edgarj.form.popup.title') %
|
|
3
|
+
'<%= t('edgarj.form.popup.title') % model_label %>');
|
|
4
4
|
$('#edgarj_form_popup').dialog('open');
|
|
5
5
|
|
data/lib/edgarj/version.rb
CHANGED