Xu Wenhao wrote: > I am wondering is there any way I could find the current namespace, > which is supplier to generate the url in a common partial or page?
I haven't taken the time to fully think this through, but on the surface I would be questioning the need for views to have any direct knowledge of routing. Routing is the responsibility of the controller layer. In a properly partitioned MVC based web application, controllers should be responsible for handling requests routed to them by lower level framework code (the configured routes in routes.rb in the case of Rails) and then render all the views to satisfy the needs of the request. The views themselves should have no knowledge of controller responsibilities. -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.