This should work:

  map.from_plugin :community_engine

  map.resources :users, :member_path => '/:id', :nested_member_path =>
'/:user_id' do |user|
    user.resources :goosers
  end

(note that it has to go beneath the community_engine routes call)


On Mon, Feb 2, 2009 at 1:31 AM, Hein <[email protected]> wrote:

>
> I wish to extend the User with a new controller in a similar way that
> clippings,photos,post etc. are currently in a route under "user_id".
>
> One way of setting up the route is by amending the vendor/plugins/
> community_engine/routes.rb and add the controller to the list as with
> "GOOSERS" below. Is there any way to do this in the default rails app
> routes file rather than editing the community_engine plugin file ?
>
>
> resources :users, :member_path => '/:id', :nested_member_path =>
> '/:user_id', :member => {
>    :dashboard => :get,
>    :assume => :get,
>    :toggle_moderator => :put,
>    :toggle_featured => :put,
>    :change_profile_photo => :put,
>    :return_admin => :get,
>    :edit_account => :get,
>    :update_account => :put,
>    :edit_pro_details => :get,
>    :update_pro_details => :put,
>    :forgot_password => [:get, :post],
>    :signup_completed => :get,
>    :invite => :get,
>    :welcome_photo => :get,
>    :welcome_about => :get,
>    :welcome_stylesheet => :get,
>    :welcome_invite => :get,
>    :welcome_complete => :get,
>    :statistics => :any,
>    :deactivate => :put
>     } do |user|
>  user.resources :friendships, :member => { :accept => :put, :deny
> => :put }, :collection => { :accepted => :get, :pending
> => :get, :denied => :get }
>  user.resources :photos, :collection => {:swfupload
> => :post, :slideshow => :get}
>  user.resources :posts, :collection => {:manage => :get}, :member =>
> {:contest => :get, :send_to_friend => :any, :update_views => :any}
>  user.resources :clippings
>  user.resources :GOOSERS
>  user.resources :activities, :collection => {:network => :get}
>  user.resources :invitations
>  user.resources :offerings, :collection => {:replace => :put}
>  user.resources :favorites, :name_prefix => 'user_'
>  user.resources :messages, :collection => { :delete_selected
> => :post }
>  user.resources :comments
> end
>
> Regards
> Hein
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to