one line conditional ruby code example Example: rails if else assignment one liner @item.property = params[:property] ? true : false