```ruby
class GroupsController < ApplicationController
  def show
    if params[:id]
      @group = Group.find(params[:id])
    else current_group
      @group = current_group
    end
    @recent_threads = @group.threads.order("created_at DESC").limit(10)
    @recent_issues = @group.recent_issues.limit(10)
  end
end
```

Handle unrecognised subdomains with a redirect to www
user
```ruby
class GroupsController < ApplicationController
  def show
    if params[:id]
      @group = Group.find(params[:id])
    elsif current_group
      @group = current_group
    end

    if @group
      @recent_threads = @group.threads.order("created_at DESC").limit(10)
      @recent_issues = @group.recent_issues.limit(10)
    else
      redirect_to root_url(subdomain: 'www')
    end
  end
end
```
assistant