Forum: Ruby on Rails map.connect or map.resources?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
49de4cd2f26705785cbef2b15a9df7aa?d=identicon&s=25 Nick Hoffman (nickh)
on 2008-12-09 03:13
(Received via mailing list)
Quick question: Would it be better to use this?:

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

or this?:

map.connect '/maps',
  :controller => :maps,
  :action     => :index

Cheers,
Nick
49de4cd2f26705785cbef2b15a9df7aa?d=identicon&s=25 Nick Hoffman (nickh)
on 2008-12-09 03:48
(Received via mailing list)
On 2008-12-08, at 21:12, Nick wrote:
> Cheers,
> Nick

BTW, that second option should actually be this:

map.connect '/maps',
   :controller => 'maps',
   :action     => 'index'

Thanks!
Nick
4c438a80fc30661ad619ea177cf9cbd0?d=identicon&s=25 Freddy Andersen (Guest)
on 2008-12-09 06:42
(Received via mailing list)
I would vote for number one... just looks cleaner and its easier to
add changes down the road like :only => [:index,:ajax_update] or
something like that...

just my 1 cent..
This topic is locked and can not be replied to.