Class: Elabs::Member::CommentsController
Constant Summary
MemberApplicationController::DEFAULT_ORDER_FIELD, MemberApplicationController::MAX_ITEMS_PER_PAGE
Instance Method Summary
collapse
Instance Method Details
#archive ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'app/controllers/elabs/member/comments_controller.rb', line 6
def archive
respond_to do |format|
if .archive!
format.html { redirect_to .content, notice: _('Comment was successfully archived.') }
format.json { render json: , status: :ok }
else
format.html { redirect_to .content, notice: _('An error occurred during process') }
format.json { render json: .errors, status: :unprocessable_entity }
end
end
end
|
#destroy ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'app/controllers/elabs/member/comments_controller.rb', line 18
def destroy
content = .content
.destroy
respond_to do |format|
format.html { redirect_to content, notice: _('Comment was successfully destroyed.') }
format.json { head :no_content }
end
end
|