Class: Homeland::RepliesController
Instance Method Summary
collapse
#admin?, #authenticate_user!, #authorize_admin!, #authorize_resource!, #current_user, #owner?, #set_seo_meta
Instance Method Details
#destroy ⇒ Object
19
20
21
22
|
# File 'app/controllers/homeland/replies_controller.rb', line 19
def destroy
reply.destroy
redirect_to(topic_path(reply.topic_id), notice: t('homeland.reply_deleted'))
end
|
#edit ⇒ Object
8
9
|
# File 'app/controllers/homeland/replies_controller.rb', line 8
def edit
end
|
#update ⇒ Object
11
12
13
14
15
16
17
|
# File 'app/controllers/homeland/replies_controller.rb', line 11
def update
if reply.update_attributes(reply_params)
redirect_to(topic_path(reply.topic_id, anchor: "reply-#{reply.id}"), notice: t('homeland.reply_updated'))
else
render action: "edit"
end
end
|