Using the `column_hash` should be more straight forward:

```ruby
model_class.columns_hash[primary_key_name]
```