sibu 1.0.8 → 1.0.9

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: 9be2c0e35af2b8d5bb5e9283434dff69b764aac6
4
- data.tar.gz: e83fbe2deb769b75efe13a4211cb9f88542d9c03
3
+ metadata.gz: a342b61a67c0e4b5181984f617ab47635611dd6a
4
+ data.tar.gz: 545735764452344e08b8c66845e948d4d569447f
5
5
  SHA512:
6
- metadata.gz: 593deedf3cecf0eae5c84ce825726d3889d4c9e4b4eba5d2733c0a8c02ba7d1c0fb1a366dfe9523710cb55962cdd7479095e6aac0703cda77282731522e3c851
7
- data.tar.gz: 7e46c8092624205af3b6506587c8a0de7f55fd406d49f2bfc5034455a2b7187c297baa35ee447982d3aeb74f4048102f457734378db1d729bb8282e4524e9fd5
6
+ metadata.gz: 18fddf4a252bf6243e3020c4082c10da885f343881dc4abbc4c0c05d894dc4885c0ad21970bc002eba918c73a25029fec34cc863df165530303dfbca512b1633
7
+ data.tar.gz: 48d28a56d1a239fda2b8ea17ba654ebff2f2ec5c6dd4181c7080ffda0bdc58d6102b198c2c024ce9e80e58b17dfbf01b6f50cc9f454eff99196a397c770d50f4
@@ -169,10 +169,14 @@ module Sibu
169
169
  end
170
170
 
171
171
  def form_label(elt, html_opts = {}, &block)
172
- defaults = {"id" => elt.is_a?(Hash) ? elt["id"] : elt, "text" => Sibu::DEFAULT_TEXT}
172
+ t_id = elt.is_a?(Hash) ? elt["id"] : elt
173
+ defaults = {"id" => t_id, "text" => Sibu::DEFAULT_TEXT}
173
174
  content = defaults.merge(elt.is_a?(Hash) ? elt : (select_element(elt) || {}))
174
- html_opts.merge!({data: {id: elt_id(elt), type: "text"}}) if action_name != 'show'
175
- content_tag(:label, raw(content["text"]).html_safe, html_opts)
175
+ @sb_section = (@sb_section || []) + [t_id]
176
+ html_opts.merge!({data: {id: @sb_section[1..-1].join('|'), type: "text"}}) if action_name != 'show'
177
+ html_output = content_tag(:label, raw(content["text"]).html_safe, html_opts)
178
+ @sb_section -= [t_id]
179
+ html_output
176
180
  end
177
181
 
178
182
  def form_input(elt, html_opts = {})
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '1.0.8'
2
+ VERSION = '1.0.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain