Class: Account::Integrations::StripeInstallationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/account/integrations/stripe_installations_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /account/teams/:team_id/integrations/stripe_installations POST /account/teams/:team_id/integrations/stripe_installations.json



26
27
28
29
30
31
32
33
34
35
36
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 26

def create
  respond_to do |format|
    if @stripe_installation.save
      format.html { redirect_to [:account, @team, :integrations_stripe_installations], notice: I18n.t("integrations/stripe_installations.notifications.created") }
      format.json { render :show, status: :created, location: [:account, @stripe_installation] }
    else
      format.html { render :new, status: :unprocessable_entity }
      format.json { render json: @stripe_installation.errors, status: :unprocessable_entity }
    end
  end
end

#destroyObject

DELETE /account/integrations/stripe_installations/:id DELETE /account/integrations/stripe_installations/:id.json



54
55
56
57
58
59
60
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 54

def destroy
  @stripe_installation.destroy
  respond_to do |format|
    format.html { redirect_to params[:return_to] || [:account, @team, :integrations_stripe_installations], notice: I18n.t("integrations/stripe_installations.notifications.destroyed") }
    format.json { head :no_content }
  end
end

#editObject

GET /account/integrations/stripe_installations/:id/edit



21
22
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 21

def edit
end

#indexObject

GET /account/teams/:team_id/integrations/stripe_installations GET /account/teams/:team_id/integrations/stripe_installations.json



6
7
8
9
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 6

def index
  # if you only want these objects shown on their parent's show page, uncomment this:
  # redirect_to [:account, @team]
end

#newObject

GET /account/teams/:team_id/integrations/stripe_installations/new



17
18
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 17

def new
end

#showObject

GET /account/integrations/stripe_installations/:id GET /account/integrations/stripe_installations/:id.json



13
14
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 13

def show
end

#updateObject

PATCH/PUT /account/integrations/stripe_installations/:id PATCH/PUT /account/integrations/stripe_installations/:id.json



40
41
42
43
44
45
46
47
48
49
50
# File 'app/controllers/account/integrations/stripe_installations_controller.rb', line 40

def update
  respond_to do |format|
    if @stripe_installation.update(stripe_installation_params)
      format.html { redirect_to [:account, @stripe_installation], notice: I18n.t("integrations/stripe_installations.notifications.updated") }
      format.json { render :show, status: :ok, location: [:account, @stripe_installation] }
    else
      format.html { render :edit, status: :unprocessable_entity }
      format.json { render json: @stripe_installation.errors, status: :unprocessable_entity }
    end
  end
end