move Wall to own resource
This commit is contained in:
parent
f3dfd22993
commit
57f3409bcc
7 changed files with 39 additions and 25 deletions
|
@ -68,22 +68,6 @@ class ProjectsController < ProjectResourceController
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Wall
|
||||
#
|
||||
|
||||
def wall
|
||||
return render_404 unless @project.wall_enabled
|
||||
|
||||
@target_type = :wall
|
||||
@target_id = nil
|
||||
@note = @project.notes.new
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
return access_denied! unless can?(current_user, :remove_project, project)
|
||||
|
||||
|
|
20
app/controllers/walls_controller.rb
Normal file
20
app/controllers/walls_controller.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
class WallsController < ProjectResourceController
|
||||
before_filter :module_enabled
|
||||
|
||||
respond_to :js, :html
|
||||
|
||||
def show
|
||||
@note = @project.notes.new
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def module_enabled
|
||||
return render_404 unless @project.wall_enabled
|
||||
end
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue