# Class ProtectedBranchesController < ProjectResourceController

- app/controllers/protected_branches_controller.rb

Methods

C
  - create
D
  - destroy
I
  - index

Instance Public methods
create() Link

Source: show

    # File app/controllers/protected_branches_controller.rb, line 13
    def create
      @project.protected_branches.create(params[:protected_branch])
      redirect_to project_protected_branches_path(@project)
    end

destroy() Link

Source: show

    # File app/controllers/protected_branches_controller.rb, line 18
    def destroy
      @project.protected_branches.find(params[:id]).destroy

      respond_to do |format|
        format.html { redirect_to project_protected_branches_path }
        format.js { render nothing: true }
      end
    end

index() Link

Source: show

    # File app/controllers/protected_branches_controller.rb, line 8
    def index
      @branches = @project.protected_branches.all
      @protected_branch = @project.protected_branches.new
    end