rubix icon indicating copy to clipboard operation
rubix copied to clipboard

Fixed bug for retrieving user_group without any users

Open ghost opened this issue 11 years ago • 0 comments

Hi,

thanks for your great library! If encountered a bug. When you try to retrieve a user_group with has no users yet, thet map is called on nil an fails. I fixed this.

1.9.3p194 :013 > user_group = Rubix::HostGroup.find_or_create(:name => 'Customers') NoMethodError: undefined method map' for nil:NilClass from /Users/Yves/.rvm/gems/ruby-1.9.3-p194/gems/rubix-0.5.14/lib/rubix/models/host_group.rb:51:inbuild' from /Users/Yves/.rvm/gems/ruby-1.9.3-p194/gems/rubix-0.5.14/lib/rubix/models/model.rb:383:in find_or_create' from (irb):13 from /Users/Yves/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in

'

ghost avatar Mar 31 '13 11:03 ghost