Class: ActionBlocks::BarchartBlocksController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- ActionBlocks::BarchartBlocksController
- Defined in:
- app/controllers/action_blocks/barchart_blocks_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#analytics ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/action_blocks/barchart_blocks_controller.rb', line 5 def analytics block = ActionBlocks.find(params[:block_key]) user = nil if block.calculate == :count render plain: block.scope.call().group(block.group.column).count.to_json end end |