Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <rest-service> master : small fixes to restfull resource
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Fri, 25 Sep 2009 17:26:17 +0200
  • Message-id: <20090925152617.GA11110@xxxxxxxxxxxxx>
* Josef Reidinger <jreidinger@xxxxxxx> [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
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. and

The only 'standard Rails' solution I can come up with is nested
modules, i.e. Org::Opensuse::Network::interface_controller (translating to

SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N├╝rnberg)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >