For readability, what about:

```ruby
param_group = @groups.detect { |g| g.name == name }
unless param_group
  #...
end

```