Module: UssdEngine::Controller::Mixin
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
14 15 16 17 18 |
# File 'lib/ussd_engine/controller/mixin.rb', line 14 def self.included(base) base.send :include, UssdEngine::Controller::Storable base.send :include, UssdEngine::Controller::Forkable base.send :skip_before_action, :verify_authenticity_token, only: :ussd_controller, raise: false end |
Instance Method Details
#ussd_controller ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/ussd_engine/controller/mixin.rb', line 20 def ussd_controller unless request.env["ussd_engine.request"].present? Config.logger&.warn "UssdEngine::Controller::Mixin :: Unknown request type" return render(status: :bad_request) end process_ussd_request build_ussd_request render body: nil end |