Refactor issues, Remove ajax

This commit is contained in:
Dmitriy Zaporozhets 2012-12-19 06:14:05 +03:00
parent 8826077471
commit 2f7effe804
17 changed files with 44 additions and 174 deletions

View file

@ -1,6 +1,6 @@
class IssuesController < ProjectResourceController
before_filter :module_enabled
before_filter :issue, only: [:edit, :update, :destroy, :show]
before_filter :issue, only: [:edit, :update, :show]
# Allow read any issue
before_filter :authorize_read_issue!
@ -11,9 +11,6 @@ class IssuesController < ProjectResourceController
# Allow modify issue
before_filter :authorize_modify_issue!, only: [:edit, :update]
# Allow destroy issue
before_filter :authorize_admin_issue!, only: [:destroy]
respond_to :js, :html
def index
@ -77,15 +74,6 @@ class IssuesController < ProjectResourceController
end
end
def destroy
@issue.destroy
respond_to do |format|
format.html { redirect_to project_issues_path }
format.js { render nothing: true }
end
end
def sort
return render_404 unless can?(current_user, :admin_issue, @project)