Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
colinyoung87 committed Jul 20, 2016
1 parent a4403ff commit f1283eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/controllers/api/v1/stories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,23 @@ def story_params

def add_tasks_to_story(story)
(params[:story][:tasks] || []).each do |task|
story.tasks.create({
story.tasks.create(
label: task[:label],
assigned_to: task[:assigned_to],
due_at: task[:due_at]
})
)
end
end

def add_attachments_to_story(story)
(params[:story][:attachments] || []).each do |file|
story.attachments.create({
story.attachments.create(
owner_id: current_user.id,
file_name: file[:file_name],
file_size: file[:file_size],
content_type: file[:content_type],
file_path: file[:file_path]
})
)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class User < ActiveRecord::Base
has_many :stories, foreign_key: "owner_id", class_name: "Story"
has_many :tasks, foreign_key: "assigned_to"
has_many :notifications, -> { order(created_at: :desc).includes(:story, :project, :team) }

has_and_belongs_to_many :projects, -> { order(name: :asc) }

has_attached_file :avatar,
Expand Down

0 comments on commit f1283eb

Please sign in to comment.