-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path65-update-project-actions.patch
32 lines (21 loc) · 1.13 KB
/
65-update-project-actions.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
update-project-actions
From: Bryan Larsen <[email protected]>
Finally, now that not all projects are viewable by all users, the projects index page won't work too well. In addition, the top-level New Project page at `/projects/new` isn't suited to our purposes any more. It will fit better with Hobo's RESTful architecture to create projects for specific users, e.g. at `/users/12/projects/new`
So we'll modify the actions provided by the projects controller to:
SHOW_PATCH
Note that there won't be a link to that new-project page by default -- we'll add one in the next section.
---
app/controllers/projects_controller.rb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 3a75081..caa8d5a 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -2,7 +2,9 @@ class ProjectsController < ApplicationController
hobo_model_controller
- auto_actions :all
+ auto_actions :show, :edit, :update, :destroy
+
+ auto_actions_for :owner, [:new, :create]
def show
@project = find_instance