Hemant Bhargava wrote:
> Colin Law wrote:
>> On 17 August 2010 14:48, Hemant Bhargava <[email protected]> wrote:
>>>
>>>
>>> Hope you people got it right.. :)
>> 
>> So are you asking the question is there a better way do define the
>> route for create_req rather than specifying it as you have above?  I
>> don't see how it could be much more concise.
> 
> Yeah i asked for the better way because i have created so many pages. So 
> for each page i have to write it as above. I mean suppose i create 10 
> pages then each time i have to write as:
> 
> map.resources :resumes,   :collection => { :create_req => :any,
>                                            :page1      => :any,
>                                            :page2      => :any,
>                                            ...................
>                                            ...................
>                                            :page10     => :any }
> So the lines of code becomes large and messy as well. Is'nt there a 
> single/two liner for this?

Sort of.  You probably don't want to use RESTful routing for this. 
Instead, you probably want something like

map.connect 'resumes/:page', :controller => 'resumes', :action => 
'some_action'

...and then look at params[:page] in the controller.

> 
> 
>> 
>> Colin

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to