Commit 4cb8242b7bd45871bd1b2f649d15a88a1efa040a
Committed by
Rafael Manzo
1 parent
cc7cf87b
Exists in
colab
and in
4 other branches
Using methods repository_params and repositories.
Signed-off-by: Renan Fichberg <rfichberg@gmail.com>
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/controllers/projects_controller.rb
... | ... | @@ -34,8 +34,8 @@ class ProjectsController < ApplicationController |
34 | 34 | # GET /project/1 |
35 | 35 | # GET /project/1.json |
36 | 36 | def show |
37 | - @project_repositories = Repository.repositories_of(params[:id]) | |
38 | 37 | set_project |
38 | + @project_repositories = @project.repositories | |
39 | 39 | end |
40 | 40 | |
41 | 41 | # GET /projects/1/edit |
... | ... | @@ -46,7 +46,7 @@ class ProjectsController < ApplicationController |
46 | 46 | |
47 | 47 | def update |
48 | 48 | set_project |
49 | - if @project.update(params[:project]) | |
49 | + if @project.update(project_params) | |
50 | 50 | redirect_to(project_path(@project.id)) |
51 | 51 | else |
52 | 52 | render "edit" | ... | ... |