Class: PostLinksController
- Inherits:
-
AdminController
- Object
- AdminController
- PostLinksController
- Defined in:
- app/controllers/post_links_controller.rb
Overview
Managing post links
Instance Method Summary collapse
-
#create ⇒ Object
post /post_links.
-
#destroy ⇒ Object
delete /post_links/:id.
Instance Method Details
#create ⇒ Object
post /post_links
8 9 10 11 12 13 14 15 |
# File 'app/controllers/post_links_controller.rb', line 8 def create @entity = PostLink.new(entity_parameters) if @entity.save render status: :created else render json: { errors: @entity.errors }, status: :bad_request end end |
#destroy ⇒ Object
delete /post_links/:id
18 19 20 21 22 |
# File 'app/controllers/post_links_controller.rb', line 18 def destroy @entity.destroy head :no_content end |