On 02/21, David Lutterkort wrote: > On Mon, 2013-02-11 at 13:35 +0100, mfoj...@redhat.com wrote: > > From: Michal Fojtik <mfoj...@redhat.com> > > > > > > Signed-off-by: Michal fojtik <mfoj...@redhat.com> > > ACK; one nit:
Thanks! Fixed all two :-) > > > diff --git a/server/lib/deltacloud/models/realm.rb > > b/server/lib/deltacloud/models/realm.rb > > index 1c25ba2..7f1e2e9 100644 > > --- a/server/lib/deltacloud/models/realm.rb > > +++ b/server/lib/deltacloud/models/realm.rb > > @@ -30,7 +30,7 @@ class Realm < BaseModel > > :state => state, > > :limit => limit > > } > > - r.merge!({:resource_types => resource_types}) if resource_types > > + r.merge!({:resource_types => resource_types || []}) > > This should just be 'r[:resource_types] = resource_types || []' ? > > > diff --git a/server/views/realms/show.xml.haml > > b/server/views/realms/show.xml.haml > > index 268cb65..f584c43 100644 > > --- a/server/views/realms/show.xml.haml > > +++ b/server/views/realms/show.xml.haml > > @@ -9,6 +9,7 @@ > > %limit< > > =cdata do > > =@realm.limit > > - - @realm.resource_types.each do |r| > > - %resource_type< > > - =r > > + - if @realm.resource_types > > + - @realm.resource_types.each do |r| > > + %resource_type< > > + =r > > Is this really needed ? You just fixed up Realm to always have an array > in resource_types ... > > David > > -- Michal Fojtik <mfoj...@redhat.com> Deltacloud API, CloudForms