Class: SchemaCommentsController
Constant Summary
ApplicationController::ALLOWABLE_CONFIGS
Instance Method Summary
collapse
Instance Method Details
#create ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/controllers/schema_comments_controller.rb', line 5
def create
respond_to do |format|
format.json do
= .create()
if .errors.any?
render json: { success: false, errors: .errors }, status: :unprocessable_entity
else
render json:
end
end
end
end
|
#destroy ⇒ Object
33
34
35
36
|
# File 'app/controllers/schema_comments_controller.rb', line 33
def destroy
.destroy
redirect_to queries_path
end
|
#update ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'app/controllers/schema_comments_controller.rb', line 19
def update
respond_to do |format|
format.json do
.update()
if .errors.any?
render json: { success: false, errors: .errors }, status: :unprocessable_entity
else
render json:
end
end
end
end
|