Class: Hg::Controllers::ChunksController
- Inherits:
-
Hg::Controller
- Object
- Hg::Controller
- Hg::Controllers::ChunksController
- Defined in:
- lib/hg/controllers/chunks_controller.rb
Overview
TODO: Document & test
Instance Attribute Summary
Attributes inherited from Hg::Controller
#handler_name, #params, #request, #user
Instance Method Summary collapse
Methods inherited from Hg::Controller
#flash, #halt, #initialize, #logger, #merged_context, #performed?, #process_action, #redirect_to, #respond, #show_typing, #t
Constructor Details
This class inherits a constructor from Hg::Controller
Instance Method Details
#display_chunk ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/hg/controllers/chunks_controller.rb', line 7 def display_chunk # TODO: Shouldn't be constantizing user input. Need a way to sanitize this. # Although - payloads shouldn't be something the client is allowed to set, in Messenger. chunk_class = Kernel.const_get(params[:chunk]) respond_with chunk_class end |