Commit 96b7ffa0 authored by Mark Chao's avatar Mark Chao

Fix coding style

parent 99fdb7d9
...@@ -30,7 +30,8 @@ module Projects ...@@ -30,7 +30,8 @@ module Projects
hashes = available_labels.as_json(only: [:title, :color]) hashes = available_labels.as_json(only: [:title, :color])
if target&.respond_to?(:labels) if target&.respond_to?(:labels)
if already_set_labels = available_labels & target.labels already_set_labels = available_labels & target.labels
if already_set_labels.present?
titles = already_set_labels.map(&:title) titles = already_set_labels.map(&:title)
hashes.each do |hash| hashes.each do |hash|
if titles.include?(hash['title']) if titles.include?(hash['title'])
......
...@@ -11,7 +11,8 @@ module Groups ...@@ -11,7 +11,8 @@ module Groups
hashes = available_labels.as_json(only: [:title, :color]) hashes = available_labels.as_json(only: [:title, :color])
if target&.respond_to?(:labels) if target&.respond_to?(:labels)
if already_set_labels = available_labels & target.labels already_set_labels = available_labels & target.labels
if already_set_labels.present?
titles = already_set_labels.map(&:title) titles = already_set_labels.map(&:title)
hashes.each do |hash| hashes.each do |hash|
if titles.include?(hash['title']) if titles.include?(hash['title'])
......
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