inline_forms 3.0.10 → 3.0.11

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjY4N2RhYTYzYWU1YjE0NTNmMTgxMWE1M2M3MzcxNDViNmM0NjI0YQ==
4
+ ODUzNWJkY2ViZjU3ZmUwMGRhY2EyM2MzNWJlM2Q1ZDg3Mjk0ZTBjMw==
5
5
  data.tar.gz: !binary |-
6
- YTQ3MzJiZDUyNmU4Y2RjMDgxMzg2YTdhZjI5NmJlMjUzYzBlMGQ4ZA==
6
+ ZDQwYTkxYmExZWNjMTI1ZTVjODE0OGM4YzAwZDdlZDcwYzI4YmQ0ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmM4YWEyMWRkMzAxNmEwNWQyMzc0MjcxNjI0ZjNkNWMxNzliN2NlZTBhYTRl
10
- OWE2YzFjZjk0ZjViMWM2YWRiNzE1ZDc5OTZiY2Q1NWY5ODZlOTY3MzQ2ZjMw
11
- MDdjMjVmYzAzOGEwODFiNWZjOTgxMzQzM2IwMmEzNTQ5MDJmM2I=
9
+ MTBhYmZiNTBhMWQxYzg4YzU2YWZlNjI4MDRjNWMwYWVkY2U3YzAzNmExZTlj
10
+ ZmNhM2Y0NGIzMzI5NGE2ZWIyMTFlOTA5NjdmZjQ0NGQ1YjhkOGIyOWNmNmRl
11
+ NDM5NmM5MjBmOTBjZjA5YTQ5NGM4MDRjYTcyYTg1ZGQ4ODliMzY=
12
12
  data.tar.gz: !binary |-
13
- YTMwZDE4YjljYjk1NDg5YzA5N2ZiZjc5NjY3N2YzYTczNGM1MDYzNjM3ZjE3
14
- MTM0OTQyYjM4ZjBhNjE5MDkwODNmNjY4N2VhYmFhOTcxNjQ0ZTkzNDdkYmEx
15
- YWVlYmQ1Njk0NjQ1MGM3MDlhOTlhOWZlNzMyMDJiNGZlOGZhZWU=
13
+ YmIxYTRmMGY4NWZmMzliNmMyNTI5ODhjNjcxZjk5YjExNzczZGJiOGFlYTEz
14
+ NGEwNzg2MjY3NjdjZWRjODBlODFhOTE2YmE4OGFjZDhjOTNkMWZhZTBiZGY5
15
+ OTM2MzY2NmUzOTJhNGJjNmEzODU3ODBjMWJlOTk5ZTM2MDlhNWU=
@@ -4,7 +4,7 @@ InlineForms::SPECIAL_COLUMN_TYPES[:dropdown_with_values]=:integer
4
4
  # dropdown_with_values
5
5
  def dropdown_with_values_show(object, attribute)
6
6
  values = attribute_values(object, attribute)
7
- link_to_inline_edit object, attribute, object.send(attribute) ? values.assoc(object.send(attribute))[1] : "<i class='fi-plus'></i>".html_safe
7
+ link_to_inline_edit object, attribute, object.send(attribute) ? t(values.assoc(object.send(attribute))[1]) : "<i class='fi-plus'></i>".html_safe
8
8
  end
9
9
  def dropdown_with_values_edit(object, attribute)
10
10
  # the leading underscore is to avoid name conflicts, like 'email' and 'email_type' will result in 'email' and 'email[email_type_id]' in the form!
@@ -14,4 +14,3 @@ end
14
14
  def dropdown_with_values_update(object, attribute)
15
15
  object[attribute.to_sym] = params[('_' + object.class.to_s.underscore).to_sym][attribute.to_sym]
16
16
  end
17
-
@@ -46,14 +46,14 @@ module InlineFormsHelper
46
46
  # new link
47
47
  def link_to_new_record(model, path_to_new, update_span, parent_class = nil, parent_id = nil, html_class = 'button new_button')
48
48
  out = (link_to "<i class='fi-plus'></i>".html_safe,
49
- send(path_to_new,
50
- :update => update_span,
51
- :parent_class => parent_class,
49
+ send(path_to_new,
50
+ :update => update_span,
51
+ :parent_class => parent_class,
52
52
  :parent_id => parent_id,
53
53
  ),
54
54
  :remote => true,
55
55
  :class => html_class,
56
- :title => t('inline_forms.view.add_new', :model => model.model_name.human )
56
+ :title => t('inline_forms.view.add_new', :model => model.model_name.human )
57
57
  )
58
58
  if cancan_enabled?
59
59
  if can? :create, model.to_s.pluralize.underscore.to_sym
@@ -145,13 +145,13 @@ module InlineFormsHelper
145
145
  if values.is_a?(Hash)
146
146
  temp = Array.new
147
147
  values.to_a.each do |k,v|
148
- temp << [ k, v ]
148
+ temp << [ k, t(v) ]
149
149
  end
150
150
  values = temp.sort {|a,b| a[0]<=>b[0]}
151
151
  else
152
152
  temp = Array.new
153
153
  values.to_a.each_index do |i|
154
- temp << [ i, values.to_a[i] ]
154
+ temp << [ i, t(values.to_a[i]) ]
155
155
  end
156
156
  values = temp.sort {|a,b| a[1]<=>b[1]}
157
157
  end
@@ -176,4 +176,3 @@ module Kernel
176
176
  caller[1] =~ /`([^']*)'/ and $1
177
177
  end
178
178
  end
179
-
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "3.0.10"
3
+ VERSION = "3.0.11"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.10
4
+ version: 3.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares