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: 
That looks perfectly reasonable to me. You could move the assignment in front of the if ( `parent_id = if params...`) or use the ternary, but I don't think the result would look better.

If parent\_id is nil or undefined before that line you can simply write:

```
parent_id = params[:parent_id] unless params[:parent_type] == "Order"

```
Nothing really wrong with it as-is, but can be made more concise:

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

```

Alternatively:

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

```