Hi
   why is this used in routes.rb I have code like below But I did not
understand what it means Could anybody please clarify this?
map.with_options(:controller => "companies") do |companies_map|
companies_map.companies_view_custom_field_permissions
''/companies/view_custom_field_permissions'',
     :action => ''view_custom_field_permissions''
companies_map.with_options(:my_company => true) do |my_company_map|
      my_company_map.my_company
''/my_company/:company_id'',                  :action =>
''show'',
:company_id => ''root''
end
end
Thanks in advance
Sijo
-- 
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On Jan 5, 4:53 am, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > why is this used in routes.rb I have code like below But I did not > understand what it means Could anybody please clarify this? >http://www.spacevatican.org/2008/11/25/with_options-for-fun-and-profit Fred> map.with_options(:controller => "companies") do |companies_map| > > companies_map.companies_view_custom_field_permissions > ''/companies/view_custom_field_permissions'', > :action => ''view_custom_field_permissions'' > > companies_map.with_options(:my_company => true) do |my_company_map| > my_company_map.my_company > ''/my_company/:company_id'', :action => ''show'', > :company_id => ''root'' > > end > > end > > Thanks in advance > Sijo > -- > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi
    Thanks for the link..Also have doubts on why to specify collection, 
path_prefix etc For example
map.resources :projects, :collection => { :all => :get, :my => :get, 
:search_all => :post, :search_my => :post } do |projects|
And here in above resources is projects as well as the local variable 
also is |projects| So Is it not a problem? What does the above mean
Sijo
-- 
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---