edgarj 0.01.28 → 0.01.29

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: b07fcbedcd0df4c22c660f933fba2590eb6dc4af
4
- data.tar.gz: eaca5c7d1c8a36c004a45f177ca061a153d1a451
3
+ metadata.gz: d5e9825ef6ec78aadf69f42ed50058dce4a39dd1
4
+ data.tar.gz: 10de985a13ab7162942803d38437352d338dfefd
5
5
  SHA512:
6
- metadata.gz: 7130d84cbb8ff5c3b13824eda7cb04fa56d8f52f99923b932be7fcd80f3cc18fd865ca402dfeb755eacd6d42c806306f5d7c4ad6977c114de4d6f2328699b345
7
- data.tar.gz: 8ed7677207aa8e4ce1f2d049ba4100207889e499a05dc45fd9658fffbe897b0da2591bfc38b1f78ab6f601b0b7d382c81b53fd57e484dfbcf7af0446403480f6
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.label.MODEL.COLUMN') if exists.
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') % model.human_name %>');
3
+ '<%= t('edgarj.form.popup.title') % model_label %>');
4
4
  $('#edgarj_form_popup').dialog('open');
5
5
 
@@ -1,3 +1,3 @@
1
1
  module Edgarj
2
- VERSION = "0.01.28"
2
+ VERSION = "0.01.29"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edgarj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.01.28
4
+ version: 0.01.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fuminori Ido