* J.Daniel Schmidt <[email protected]> [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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to