I’m working on an application for which the admin has to activate ‘topics’ before they are shown. The topics table simply has a column called active.
I’m using the ActiveAdmin gem for the rest of the admin panel and I also have an edit page for topics where every aspect of the topic can be changed. However, I would also like to have a secondary page for topics which would only display that title, and make it possible to activate the topic (without being able to change the other columns). I’m sure this would be more user-friendly, but I don’t know how to go about it, or if it is even possible.
I have the impression that only one edit page can be made for each model.
Any ideas?
EDIT
topic.erb
class Topic < ActiveRecord::Base
scope :pending, where(:active => false)
validates_presence_of :title, :description, :user_id
belongs_to :user
has_many :solutions
accepts_nested_attributes_for :solutions, :allow_destroy => true, :reject_if => Proc.new{|attributes| attributes["title"].blank?}
acts_as_taggable
end
I can’t try it right now myself, but I’d say you want something like this as ActiveAdmin configuration:
Where the
pendingscope would be a model scope for just showing the pending (not active) topics. Like:Best Regards
Tobias