Class: BasecampIntegrationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/basecamp_integrations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /basecamp_integrations POST /basecamp_integrations.json



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'app/controllers/basecamp_integrations_controller.rb', line 28

def create
  @basecamp_integration = BasecampIntegration.new(basecamp_integration_params)

  respond_to do |format|
    if @basecamp_integration.save
      format.html { redirect_to @basecamp_integration, notice: 'Basecamp integration was successfully created.' }
      format.json { render :show, status: :created, location: @basecamp_integration }
    else
      format.html { render :new }
      format.json { render json: @basecamp_integration.errors, status: :unprocessable_entity }
    end
  end
end

#destroyObject

DELETE /basecamp_integrations/1 DELETE /basecamp_integrations/1.json



58
59
60
61
62
63
64
# File 'app/controllers/basecamp_integrations_controller.rb', line 58

def destroy
  @basecamp_integration.destroy
  respond_to do |format|
    format.html { redirect_to basecamp_integrations_url, notice: 'Basecamp integration was successfully destroyed.' }
    format.json { head :no_content }
  end
end

#editObject

GET /basecamp_integrations/1/edit



23
24
# File 'app/controllers/basecamp_integrations_controller.rb', line 23

def edit
end

#indexObject

GET /basecamp_integrations GET /basecamp_integrations.json



8
9
10
# File 'app/controllers/basecamp_integrations_controller.rb', line 8

def index
  @basecamp_integrations = BasecampIntegration.all
end

#newObject

GET /basecamp_integrations/new



18
19
20
# File 'app/controllers/basecamp_integrations_controller.rb', line 18

def new
  @basecamp_integration = BasecampIntegration.new
end

#showObject

GET /basecamp_integrations/1 GET /basecamp_integrations/1.json



14
15
# File 'app/controllers/basecamp_integrations_controller.rb', line 14

def show
end

#updateObject

PATCH/PUT /basecamp_integrations/1 PATCH/PUT /basecamp_integrations/1.json



44
45
46
47
48
49
50
51
52
53
54
# File 'app/controllers/basecamp_integrations_controller.rb', line 44

def update
  respond_to do |format|
    if @basecamp_integration.update(basecamp_integration_params)
      format.html { redirect_to @basecamp_integration, notice: 'Basecamp integration was successfully updated.' }
      format.json { render :show, status: :ok, location: @basecamp_integration }
    else
      format.html { render :edit }
      format.json { render json: @basecamp_integration.errors, status: :unprocessable_entity }
    end
  end
end