Question: ```
  if params[:parent_type] == "Order"
    parent_id = nil
  else
    parent_id = params[:parent_id]
  end

```

Would a Ruby person laugh at me for writing it this way? It doesn't seem particularly concise like some Ruby code I've seen.

Answer: 
I think it's fine the way it is. I'm a Ruby person, and I wouldn't laugh at you for writing it that way. It's clear what the code does and there's no real code duplication, so I wouldn't worry about it.
One more variation:

```
parent_id = (params[:parent_type] == "Order") && params[:parent_id]

```