mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-29 06:26:07 +10:00
Fix Style/Not cop violations
This commit is contained in:
@@ -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);")
|
||||
|
||||
Reference in New Issue
Block a user