Repository URL to install this package:
|
Version:
2.5.0 ▾
|
ActiveAdmin.register <%= @model_name %> do
menu priority: 2
actions :all, except: [:show]
config.sort_order = 'published_at DESC'
permit_params Articular.params, news_topic_ids: []
filter :title
filter :body
filter :published_at
scope :all
scope :published
form partial: 'articular/admin/form'
index do
column :title
column :state do |post|
span post.state, class: "state-label #{post.state}"
end
column :published_at
actions
end
controller do
def find_resource
scoped_collection.friendly.find(params[:id]) #FriendlyId Find
end
end
end