diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-20 18:14:17 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-27 23:02:44 +0200 |
commit | 2099afae76ae1e8bdba495f1a996a3f5aab3fb0c (patch) | |
tree | 7d6aa8e2e530d41af70a8eb3a5d0f3b32648f543 /lib | |
parent | Cleaned detailed tags (diff) | |
download | recruiting-webapp-2099afae76ae1e8bdba495f1a996a3f5aab3fb0c.tar.gz recruiting-webapp-2099afae76ae1e8bdba495f1a996a3f5aab3fb0c.tar.bz2 recruiting-webapp-2099afae76ae1e8bdba495f1a996a3f5aab3fb0c.zip |
Made Checklist a regular input
Previously it had to be handled separately.
Updated Answer#update_from and Answer#new_from to work with it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rich_types/check_list.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rich_types/check_list.rb b/lib/rich_types/check_list.rb index 7605d62..fe8986b 100644 --- a/lib/rich_types/check_list.rb +++ b/lib/rich_types/check_list.rb @@ -25,9 +25,10 @@ module RichTypes @opt_list = what elsif klass == Array - for i in @opt_list.keys - @opt_list[i][:checked] = what.include?(i) - end + what = what.collect{ |x| x.to_i } + for i in @opt_list.keys + @opt_list[i][:checked] = what.include?(i) + end elsif klass == String # Convert to Array and use = for Arrays |