Ruby on Rails Monday, November 29, 2010

Hello,

I've got some problems migrating from rails2 to rails3: I have some
controllers in a subdirectory, and I want to access them in a
non-restful/resourceful way.

Previously I just created a controller in /util, prefixed the class name
with Util:: and it worked, that is /util/controller_name/action_name was
routed properly.

I was trying various approaches with :namespace, e.g.:

namespace :util do
match ':controller(/:action(/:id(.:format)))'
end

but that throws an exception during boot: ":controller segment is not
allowed within a namespace block"

What is the proper way to map such controllers?

--
Thanks,
Adam Warski

--
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@googlegroups.com.
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.

No comments:

Post a Comment