Mailinglist Archive: yast-devel (233 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] <rest-service> master : new templates
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Tue, 13 Oct 2009 13:53:38 +0200
  • Message-id: <20091013115338.GB18534@xxxxxxxxxxxxx>
* J.Daniel Schmidt <jdsn@xxxxxxx> [Oct 13. 2009 13:27]:
+++ b/plugins/registration/app/views/registration/create.html.erb
@@ -0,0 +1,11 @@
+<%= # @registration == nil ? "@registration is nil - FIXME" :
@registration.to_xml
+ -%>
+<%= case @registration.class.to_s
+ when 'NilClass'
+ "@registration is nil"
+ when 'String'
+ @registration.to_s
+ when 'Registration'
+ @registration.to_xml
+ end

There's no need to convert the class to a string. Do a simple

case @registration

and match for classes in the 'when'.

Klaus
---
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 >
This Thread
  • No further messages