Skip to content

Instantly share code, notes, and snippets.

@stabenfeldt
Last active August 29, 2015 14:07
Show Gist options
  • Save stabenfeldt/5e604eb6d4eba12dd02e to your computer and use it in GitHub Desktop.
Save stabenfeldt/5e604eb6d4eba12dd02e to your computer and use it in GitHub Desktop.
tree 9060b23f8938c07b20af9729eb28b20076f6bc75
parent 15c6ec3d071220ab1d5595145e3a6a996a89111d
author Jakub Głuszecki <[email protected]> Thu Sep 25 13:16:54 2014 +0200
committer Jakub Głuszecki <[email protected]> Thu Sep 25 13:16:54 2014 +0200
code format/cleanup
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 91c7195..8dbcafd 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -5,9 +5,9 @@ class ProjectsController < ApplicationController
# GET /projects
# GET /projects.json
def index
- @departments = @current_user.project_departments
- @starred_projects = Project.where(user: @current_user, starred: true, complete: false).all.to_a
- @starred_customers = Customer.where(starred: true).all.to_a
+ @departments = @current_user.project_departments
+ @starred_projects = Project.where(user: @current_user, starred: true, complete: false)
+ @starred_customers = Customer.where(starred: true)
@completed_projects = Project.where(user: @current_user, complete: true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment