This is OK, but the following is better:
```ruby
t.references :group
```

You can generate that using the `references` type. For example
```sh
$ rails generate model Comment commenter:string body:text post:references
```

More info [here][docs].

  [docs]: http://guides.rubyonrails.org/getting_started.html#generating-a-model