Commit f2215e4c98f7c431dfbe3efedd2ba533457a359c

Authored by Austin Smith
1 parent 83f8099227
Exists in master

fixing multi-line statements

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

app/models/task_board_column.rb View file @ f2215e4
... ... @@ -7,8 +7,8 @@
7 7  
8 8 def self.empty_status(status_id)
9 9 columns = TaskBoardColumn
10   - .select(:id)
11   - .joins('INNER JOIN issue_statuses_task_board_columns istbc ON istbc.task_board_column_id = task_board_columns.id')
  10 + .select(:id) \
  11 + .joins('INNER JOIN issue_statuses_task_board_columns istbc ON istbc.task_board_column_id = task_board_columns.id') \
12 12 .where('istbc.issue_status_id = ?', status_id)
13 13 puts columns
14 14 return columns.empty?
... ... @@ -18,9 +18,9 @@
18 18 @column_statuses = Hash.new
19 19 self.issue_statuses.order(:name).each do |status|
20 20 @column_statuses[status.id] = Array.new
21   - issues = Issue.select("issues.*, tbi.is_archived, tbi.#{order_column} as weight, tbi.issue_id")
22   - .joins('LEFT OUTER JOIN task_board_issues AS tbi ON tbi.issue_id = issues.id')
23   - .where("project_id = ? AND status_id = ? AND (is_archived IS NULL OR is_archived = 0)", self.project_id, status.id)
  21 + issues = Issue.select("issues.*, tbi.is_archived, tbi.#{order_column} as weight, tbi.issue_id") \
  22 + .joins('LEFT OUTER JOIN task_board_issues AS tbi ON tbi.issue_id = issues.id') \
  23 + .where("project_id = ? AND status_id = ? AND (is_archived IS NULL OR is_archived = 0)", self.project_id, status.id) \
24 24 .order("weight ASC, created_on ASC")
25 25 issues.each do |issue|
26 26 # Create a TaskBoardIssue (i.e. a Card) if one doesn't exist already.