Class: ActionBlocks::ModelBlocksController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/action_blocks/model_blocks_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#validate_action_block

Instance Method Details

#nameObject



6
7
8
9
10
# File 'app/controllers/action_blocks/model_blocks_controller.rb', line 6

def name
  model_block = ActionBlocks.find(params[:block_key])
  record_id = Integer(params[:record_id])
  render json: model_block.name_to_json(record_id: record_id, user: current_user)
end