mxit-rails 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/mxit_rails/page.rb +3 -2
- data/lib/mxit_rails/version.rb +1 -1
- metadata +1 -1
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.
|
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
|
|
data/lib/mxit_rails/page.rb
CHANGED
@@ -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 =
|
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 =
|
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
|
data/lib/mxit_rails/version.rb
CHANGED