Class: Fae::DeployController

Inherits:
ApplicationController show all
Includes:
ApplicationHelper
Defined in:
app/controllers/fae/deploy_controller.rb

Instance Method Summary collapse

Methods included from ApplicationHelper

#body_class, #change_item_link, #col_name_or_image, #deployments_active_class, #fae_scope, #form_header, #nav_active_class, #netlify_enabled?, #page_title, #require_locals

Instance Method Details

#deploy_siteObject



16
17
18
19
20
21
# File 'app/controllers/fae/deploy_controller.rb', line 16

def deploy_site
  if Fae::NetlifyApi.new().run_deploy(params['deploy_hook_type'], current_user)
    return render json: { success: true }
  end
  render json: {success: false}
end

#deploys_listObject



12
13
14
# File 'app/controllers/fae/deploy_controller.rb', line 12

def deploys_list
  render json: Fae::NetlifyApi.new().get_deploys
end

#indexObject



7
8
9
10
# File 'app/controllers/fae/deploy_controller.rb', line 7

def index
  raise 'Fae.netlify configs are missing.' unless netlify_enabled?
  @deploy_hooks = DeployHook.all
end