BigW Consortium Gitlab

Commit 4dbf118a by Robert Speicher

Fix Style/Not cop violations

parent 0716a559
......@@ -12,9 +12,9 @@
module Select2Helper
def select2(value, options={})
raise "Must pass a hash containing 'from'" if not options.is_a?(Hash) or not options.has_key?(:from)
raise ArgumentError, 'options must be a Hash' unless options.kind_of?(Hash)
selector = options[:from]
selector = options.fetch(:from)
if options[:multiple]
execute_script("$('#{selector}').select2('val', ['#{value}'], true);")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment