Sha256: 03c6fca9e40c5f490d7510352a1381a0f9048bab679a15de8eb875c038d065ce

Contents?: true

Size: 747 Bytes

Versions: 5

Compression:

Stored size: 747 Bytes

Contents

class CommitsController < ApplicationController
  layout 'projects'
  before_filter :load_project
  
  def index
    if params[:secret]
      create
    else
      params[:branch] ||= 'master'
      @commits = @project.commits(params[:branch],10,params[:page].to_i || 1)
    end
  end

  def show
    @commit = @project.commits
  end
  
  def update
    @project.create_task_for_build_commit(params[:id])
      
    respond_to do |wants|
      wants.html do
        redirect_to :back
      end
    end
  end
  
  def create
    if params[:secret] == @project.preferences.secret
      task = @project.create_fetch_task
      redirect_to project_task_path(@project,task)
    else
      raise ActionController::MethodNotAllowed
    end
  end
  

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ginst-2009.12.8 app/controllers/commits_controller.rb
ginst-2009.11.24 app/controllers/commits_controller.rb
ginst-2009.11.23 app/controllers/commits_controller.rb
ginst-2.0.1 app/controllers/commits_controller.rb
ginst-2.0.0 app/controllers/commits_controller.rb