Class: Api::UserLinksController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Api::UserLinksController
- Defined in:
- app/controllers/api/user_links_controller.rb
Instance Method Summary collapse
Instance Method Details
#hide ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/api/user_links_controller.rb', line 5 def hide if @entity.followee == current_user @entity.update(visible: false) render json: { data: { visible: @entity.visible? } } else = "User #{current_user.id} is not followee for link #{@entity.id}" handle_http_404() end end |