Class: ActionBlocks::BlocksController

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

Instance Method Summary collapse

Methods inherited from BaseController

#validate_action_block

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
# File 'app/controllers/action_blocks/blocks_controller.rb', line 6

def index
  user = nil
  if ActionBlocks.invalid?
    render json: {errors: ActionBlocks.errors}.to_json, content_type: 'application/json'
  else
    render json: ActionBlocks.hashify(user).to_json, content_type: 'application/json'
  end
end