Class: Hephaestus::StaffController

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

Constant Summary

Constants included from Headers

Headers::EVENT_AFTER_CREATE, Headers::EVENT_AFTER_DESTROY, Headers::EVENT_AFTER_RENAME, Headers::EVENT_AFTER_UPDATE, Headers::EVENT_AFTER_VIEW, Headers::HEADER_EVENT, Headers::HEADER_RECORD_TYPE, Headers::HEADER_SIGNATURE, Headers::RECORD_TYPE_CONVERSATION, Headers::RECORD_TYPE_INBOX, Headers::RECORD_TYPE_MESSAGE, Headers::RECORD_TYPE_ORGANIZATION, Headers::RECORD_TYPE_PLUG_INSTALLATION, Headers::YETTO_DELIVERY_ID

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationController

#ensure_json_request, #parse_state

Methods included from Responses

#bad_gateway, #bad_request, #created, #forbidden, #internal_server_error, #no_content, #not_acceptable, #not_found, #okay, #service_unavailable

Class Method Details

.staff_request?(request) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'app/controllers/hephaestus/staff_controller.rb', line 9

def staff_request?(request)
  return true if Rails.env.development?

  true
end

Instance Method Details

#indexObject



16
17
18
# File 'app/controllers/hephaestus/staff_controller.rb', line 16

def index
  render404 unless StaffController.staff_request?(request)
end