Files
astuto/app/controllers/post_status_changes_controller.rb
Riccardo Graziosi dad382d2b1 Post follow and updates notifications V1 (#111)
* It is now possible to follow a post in order to receive updates about it
* Notifications are now sent when updates are published
* Post status changes are now tracked
* Update sidebar now shows the post status history
* Mark a comment as a post update using the comment form
* ... more ...
2022-05-28 11:03:36 +02:00

16 lines
413 B
Ruby

class PostStatusChangesController < ApplicationController
def index
post_status_changes = PostStatusChange
.select(
:post_status_id,
:updated_at,
'users.full_name as user_full_name',
'users.email as user_email',
)
.where(post_id: params[:post_id])
.left_outer_joins(:user)
.order(updated_at: :asc)
render json: post_status_changes
end
end