biola_wcms_components 0.15.2 → 0.15.3

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: e8cb842515a500636192d1ed84662425677bba4e
4
- data.tar.gz: b0dd1dc586090458017a14c7e7df22554bec3001
3
+ metadata.gz: ffd0d1fb18e5a79c390034f9cec5243dd1c1f01f
4
+ data.tar.gz: 39992c5cbdfc22e6d62018cd4745fe0ac6d34697
5
5
  SHA512:
6
- metadata.gz: 4d7001881f6214657e0074b0be3452711b3faec9d738ef88d3a13dd0830911c99c8035b387a8765566aec2200b99a97b4828fc28252facd2e68fad35961af426
7
- data.tar.gz: d2065723ec149e55d82222d166eb76642b098f2b574536a45e67f96d4bd42ad62cb4fce67b886faaf80669f737f057ccdf3d7940e9daba5b003724c1a3c29ff2
6
+ metadata.gz: 1798d6ffe00a15d219271539e91d4c9dc159fb8d76124ed226e9d8e08da0147be5411b951e11e0ea9c9b38428ab68d08aa2fe963e73620f8668e96f5b8604163
7
+ data.tar.gz: 1cc40efd52f25c835061b02f635d7a79b2e8868db668726e9f9ed4fe2f94c8b16bcdf59245434a3f629617f8775a1c2d59af3250e49692e2b007aa822d9579e9
@@ -1,6 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
3
  ### Master (unreleased)
4
+ ### 0.15.3
5
+
6
+ * Added select_tag to the multiselect form element with attributes
4
7
 
5
8
  ### 0.15.2
6
9
 
@@ -1,17 +1,22 @@
1
1
  ruby:
2
- raise 'Form parameter is required' if form.blank?
3
2
 
3
+ form ||= nil
4
4
  attribute ||= nil # attribute name that the editor should be attached to
5
5
  collection ||= nil
6
6
  value_method ||= nil
7
7
  text_method ||= nil
8
8
  multiple ||= nil
9
9
  prompt ||= nil
10
+ selected ||= nil
10
11
 
11
12
  options = {}
12
13
  html_options = {class: 'form-control bs-multiselect'}
13
14
  html_options[:multiple] = 'multiple' if multiple
14
- options[:prompt] = prompt if prompt
15
+ options[:prompt] = prompt if prompt && form
16
+ html_options[:prompt] = prompt if prompt && !form
15
17
 
16
18
  div
17
- = form.collection_select attribute, collection, value_method, text_method, options, html_options
19
+ - if form.present?
20
+ = form.collection_select attribute, collection, value_method, text_method, options, html_options
21
+ - else
22
+ = select_tag attribute, options_from_collection_for_select(collection, value_method, text_method, selected), html_options
@@ -1,3 +1,3 @@
1
1
  module BiolaWcmsComponents
2
- VERSION = "0.15.2"
2
+ VERSION = "0.15.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biola_wcms_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ace-rails-ap