i just start playing with active_admin, I have 2 resources:
class Category < ActiveRecord::Base
validates :name, :presence => true
has_many :auctions
end
and
class Auction < ActiveRecord::Base
belongs_to :category
end
under app/admin I have auctions.rb and categories.rb
ActiveAdmin.register Auction do
end
ActiveAdmin.register Category do
end
my questions are:
- in order to show all the auctions for a given category what should i do to generate the nested resource for it? (/admin/categories/1/auctions)
- in my frontend i have to show all the auctions without the admin/ prefix, basically I need this http://local/auctions available, I tried to add in the routes.rb the directive resources :auctions but I need to generare a new auctions controller outside the admin/ scope. Is this a good way to take?
Thank you