Methods
A
B
C
E
I
M
N
S
U
Instance Public methods
bulk_update()
# File app/controllers/issues_controller.rb, line 99
def bulk_update
  result = IssuesBulkUpdateContext.new(project, current_user, params).execute
  redirect_to :back, notice: "#{result[:count]} issues updated"
end
create()
# File app/controllers/issues_controller.rb, line 45
def create
  @issue = @project.issues.new(params[:issue])
  @issue.author = current_user
  @issue.save

  respond_to do |format|
    format.html do
      if @issue.valid?
        redirect_to project_issue_path(@project, @issue)
      else
        render :new
      end
    end
    format.js
  end
end
edit()
# File app/controllers/issues_controller.rb, line 32
def edit
  respond_with(@issue)
end
index()
# File app/controllers/issues_controller.rb, line 16
def index
  @issues = issues_filtered
  @issues = @issues.page(params[:page]).per(20)

  respond_to do |format|
    format.html # index.html.erb
    format.js
    format.atom { render layout: false }
  end
end
new()
# File app/controllers/issues_controller.rb, line 27
def new
  @issue = @project.issues.new(params[:issue])
  respond_with(@issue)
end
# File app/controllers/issues_controller.rb, line 89
def search
  terms = params['terms']

  @issues = issues_filtered
  @issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank?
  @issues = @issues.page(params[:page]).per(100)

  render partial: 'issues'
end
show()
# File app/controllers/issues_controller.rb, line 36
def show
  @note = @project.notes.new(noteable: @issue)

  respond_to do |format|
    format.html
    format.js
  end
end
sort()
# File app/controllers/issues_controller.rb, line 77
def sort
  return render_404 unless can?(current_user, :admin_issue, @project)

  @issues = @project.issues.where(id: params['issue'])
  @issues.each do |issue|
    issue.position = params['issue'].index(issue.id.to_s) + 1
    issue.save
  end

  render nothing: true
end
update()
# File app/controllers/issues_controller.rb, line 62
def update
  @issue.update_attributes(params[:issue].merge(author_id_of_changes: current_user.id))

  respond_to do |format|
    format.js
    format.html do
      if @issue.valid?
        redirect_to [@project, @issue]
      else
        render :edit
      end
    end
  end
end
Instance Protected methods
authorize_admin_issue!()
# File app/controllers/issues_controller.rb, line 114
def authorize_admin_issue!
  return render_404 unless can?(current_user, :admin_issue, @issue)
end
authorize_modify_issue!()
# File app/controllers/issues_controller.rb, line 110
def authorize_modify_issue!
  return render_404 unless can?(current_user, :modify_issue, @issue)
end
issue()
# File app/controllers/issues_controller.rb, line 106
def issue
  @issue ||= @project.issues.find(params[:id])
end
issues_filtered()
# File app/controllers/issues_controller.rb, line 122
def issues_filtered
  @issues = IssuesListContext.new(project, current_user, params).execute
end
module_enabled()
# File app/controllers/issues_controller.rb, line 118
def module_enabled
  return render_404 unless @project.issues_enabled
end