mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Models and controllers looks more like Rails
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
class StaticPagesController < ApplicationController
|
||||
def roadmap
|
||||
@post_statuses = PostStatus
|
||||
.find_roadmap
|
||||
.select(:id, :name, :color)
|
||||
.where(show_in_roadmap: true)
|
||||
.order(order: :asc)
|
||||
|
||||
@posts = Post
|
||||
.find_with_post_status_in(@post_statuses)
|
||||
.select(:id, :title, :board_id, :post_status_id, :user_id, :created_at)
|
||||
.where(post_status_id: @post_statuses.pluck(:id))
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user