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 like:

```
parent_id = (params[:parent_type] == "Order" ? nil : params[:parent_id])
```
One more variation:

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

```