views:

22

answers:

1

i would like an index action to be able to take get and post methods, is this possible and if so how?

how do you write the route if in this case

map.resources :content, :only => [ :index ]

Many thanks

A: 

Not sure if this will work with resource routes.

map.resources :content, :only => [ :index ], :conditions => {:method => [:get, :post]}

If not you should probably just make it a named route anyhow.

map.content 'content', :controller => :content, :action => :index ,:conditions => {:method => [:get, :post]}
mark
your a star thanks
nodrog