roda-component 0.1.23 → 0.1.24

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: 92853f7a4482978ca64e2dbb1dc688c6b113f8ba
4
- data.tar.gz: 15690b78f86016b7569bda1d94e2ea25e9478542
3
+ metadata.gz: ff8336613ebc26d6354cb84d5f66318bb85bbcc9
4
+ data.tar.gz: 600e954b6328e17635784196b778ee41da113db7
5
5
  SHA512:
6
- metadata.gz: 7d85d941ac1792fa14556b70585e423fe4662b891b2e4f0251360e85321a10f59b86f3731d5c9ea9c31a533c04011061dc0338b03390d9fec5ab722f6e0001a5
7
- data.tar.gz: 20b3badf17176a236538f8386a37c01643f65e7ccd0e79de55a6eceefeae27d74c9f54609388bef37f783fd56bb09d429733399e1925e303c2883f5f92c0c5f4
6
+ metadata.gz: 3c956b16f6ee27862ca8a9a9eff6ab2e60a3c784424777fa9c98790591835f286aacb0666b6dd9b9188d3ec7c109f83dce73acd875862d0be34e91025a2466a2
7
+ data.tar.gz: 004554a394e137ed9424028168a2329e9aa92636a80a80174b61b46cd13b6e5b169bd536a94b71511e4dde7e1bc0463852e5282c62e9e5e96db0dfba59c54ded
@@ -49,6 +49,10 @@ class Roda
49
49
  node["data-#{key}"] = value
50
50
  end
51
51
  end
52
+
53
+ def val value
54
+ node.content = value
55
+ end
52
56
  end
53
57
 
54
58
  def html= content
@@ -210,7 +210,7 @@ class Roda
210
210
  dom = _options[:dom] unless dom
211
211
  key = _options[:key] if !key && _options.key?(:key)
212
212
 
213
- dom.find('input, select') do |element|
213
+ dom.find('input, select, textarea') do |element|
214
214
  name = element['name']
215
215
  name = name.gsub(/\A#{key}/, '') if key
216
216
  keys = name.gsub(/\A\[/, '').gsub(/[^a-z0-9_]/, '|').gsub(/\|\|/, '|').gsub(/\|$/, '').split('|')
@@ -238,6 +238,8 @@ class Roda
238
238
  end
239
239
  when 'input'
240
240
  element['value'] = value.to_s
241
+ when 'textarea'
242
+ element.val value.to_s
241
243
  end
242
244
  end
243
245
  end
@@ -1,5 +1,5 @@
1
1
  class Roda
2
2
  class Component
3
- VERSION = "0.1.23"
3
+ VERSION = "0.1.24"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roda-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj