mxit-rails 0.3.2 → 0.3.3

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.
data/README.md CHANGED
@@ -19,7 +19,7 @@ Installation
19
19
  ------------
20
20
  To use the gem, just include the gem your rails projects' gemfile:
21
21
 
22
- gem 'mxit-rails', '~> 0.3.2'
22
+ gem 'mxit-rails', '~> 0.3.3'
23
23
 
24
24
  [Heroku](https://devcenter.heroku.com/articles/rails3) provides the simplest way to get a rails app running on the web.
25
25
 
@@ -181,12 +181,13 @@ module MxitRails
181
181
  descriptor.select_label = select_label
182
182
  descriptor.select_options = {}
183
183
  select_options.each {|k,v| descriptor.select_options[k.to_s.to_sym] = v}
184
+ descriptor.selected = []
184
185
  if options.include? :selected
185
186
  raise "Invalid :selected options for select - string expected, array received" if options[:selected].is_a?(Array)
186
187
  # Convert to string first so that integer values are handled properly
187
188
  descriptor.selected = [ options[:selected].to_s.to_sym ]
188
189
  end
189
- descriptor.numbered_list = true if options[:numbered_list]
190
+ descriptor.numbered_list = options[:numbered_list] ? true : false
190
191
  descriptor.multi_select = false
191
192
  end
192
193
  def multi_select select_name, select_label, select_options, options = {}
@@ -200,7 +201,7 @@ module MxitRails
200
201
  end
201
202
  mxit_form_session[select_name] ||= options[:selected] || []
202
203
  descriptor.selected = mxit_form_session[select_name]
203
- descriptor.numbered_list = true if options[:numbered_list]
204
+ descriptor.numbered_list = options[:numbered_list] ? true : false
204
205
  descriptor.multi_select = true
205
206
  descriptor.multi_select_next = options[:submit_label] || 'Next'
206
207
  end
@@ -1,3 +1,3 @@
1
1
  module MxitRails
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mxit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: