Files
astuto/app/controllers/post_status_changes_controller.rb
2022-06-22 10:17:42 +02:00

16 lines
413 B
Ruby

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