Sha256: 484bee0ad2ed9a18ef0e10ed7fe82138061a31015e6b472a903e0d6c6803bc1c

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

ActionController::Routing::Routes.draw do |map|
  map.with_options :path_prefix => '/forum' do |forum|
    forum.resources :forums, :only => [:index, :show], :has_many => [:topics, :posts]
    forum.resources :topics, :has_many => [:posts]
    forum.resources :posts, :collection => {:search => :get}
    forum.resources :pages, :has_many => [:posts], :has_one => [:topic]
  end
  
  # forum admin is nested under readers to save interface clutter
  # some time soon I'll add proper moderation of topics and posts
  map.namespace :admin, :member => { :remove => :get }, :path_prefix => 'admin/readers' do |admin|
    admin.resources :forums
    # admin.resources :topics
    # admin.resources :posts
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
radiant-forum-extension-0.6.1 config/routes.rb
radiant-forum-extension-0.6.0 config/routes.rb