* Josef Reidinger <[email protected]> [Sep 25. 2009 16:14]:
> > 
> >      def link_to
> > -      "/#...@controller}/#...@singular ? "show" : "index"}"
> > +      "/#...@controller}/#{action}"
> 
> ^^^
> This is root of actual problems. It is not true, that route is controller. It 
> is not how is routes created in lib/resource_registration. So this two values 
> dismatch and all plugin that have different last identifier from interface 
> and 
> controller name is broken. (now systemtime plugin)

Great catch, thanks !

Yes, resource routing needs fixing and we agreed to look into this
together with Karel. We have to move carefully here since Rails
routing is _very_ delicate.



That said, the direct way (i.e. let every resource provide its own
route.rb file) might not match the requirements.

The requirement is to support many resource implementations while
preventing them from stepping on each other toes.

Example: An 'interface' resource below 'network'. This would normally
translate into a Network::interface_controller (-> network/interface url).

Problem: How do we support another contributor with his own
implementation of network interfaces ?

This whole 'base resources on dot.separated.interface.pathes' is to
support i.e. org.opensuse.network.interface and com.redhat.network.interface
side-by-side.

The only 'standard Rails' solution I can come up with is nested
modules, i.e. Org::Opensuse::Network::interface_controller (translating to
app/controllers/org/opensuse/network/interface_controller.rb).

Klaus
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to