# It allows you to select value from select2## Params# value - real value of selected item# opts - options containing css selector## Usage:## select2(2, from: '#user_ids')#moduleSelect2Helperdefselect2(value,options={})raise"Must pass a hash containing 'from'"ifnotoptions.is_a?(Hash)ornotoptions.has_key?(:from)selector=options[:from]ifoptions[:multiple]page.execute_script("$('#{selector}').select2('val', ['#{value}']);")elsepage.execute_script("$('#{selector}').select2('val', '#{value}');")endendend