mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Fix bug in post status edit
This commit is contained in:
@@ -7,6 +7,7 @@ class PostsController < ApplicationController
|
|||||||
.where(filter_params)
|
.where(filter_params)
|
||||||
.search_by_name_or_description(params[:search])
|
.search_by_name_or_description(params[:search])
|
||||||
.page(params[:page])
|
.page(params[:page])
|
||||||
|
.order(updated_at: :desc)
|
||||||
|
|
||||||
render json: posts
|
render json: posts
|
||||||
end
|
end
|
||||||
@@ -25,9 +26,7 @@ class PostsController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@post = Post.find(params[:id])
|
@post = Post.find(params[:id])
|
||||||
@post_statuses = PostStatus
|
@post_statuses = PostStatus.select(:id, :name, :color).order(order: :asc)
|
||||||
.find_roadmap
|
|
||||||
.select(:id, :name, :color)
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|||||||
Reference in New Issue
Block a user