Module: Kea::Controller
- Defined in:
- lib/kea/controller.rb
Instance Attribute Summary collapse
-
#running_via_kea ⇒ Object
Returns the value of attribute running_via_kea.
Instance Method Summary collapse
Instance Attribute Details
#running_via_kea ⇒ Object
Returns the value of attribute running_via_kea.
3 4 5 |
# File 'lib/kea/controller.rb', line 3 def running_via_kea @running_via_kea end |
Instance Method Details
#params ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/kea/controller.rb', line 15 def params if @running_via_kea request.params['params'] else request.params end end |
#render_props_or_component ⇒ Object
23 24 25 26 27 28 |
# File 'lib/kea/controller.rb', line 23 def render_props_or_component respond_to do |format| format.html { render 'kea/component' } format.json { render json: @props } end end |
#run_kea_action ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/kea/controller.rb', line 5 def run_kea_action active_method = params['method'] if self.respond_to? active_method @running_via_kea = true self.send(active_method) else raise Kea::ActionNotFoundError end end |