如何在我的下拉列表中显示每个车辆的布尔活动属性?即凯美瑞-主动吉普-停用雅阁-主动
= select("drivers_vehicle", "vehicle_id", Vehicle.accessible_by(current_ability).all.collect { |o| [o.name, o.id] })
如何在我的下拉列表中显示每个车辆的布尔活动属性?即凯美瑞-主动吉普-停用雅阁-主动
= select("drivers_vehicle", "vehicle_id", Vehicle.accessible_by(current_ability).all.collect { |o| [o.name, o.id] })
= select("drivers_vehicle", "vehicle_id", Vehicle.accessible_by(current_ability).all.collect { |o| ["#{o.name} - #{o.active ? 'active' : 'deactivated'}", o.id] })
= select("drivers_vehicle", "vehicle_id", Vehicle.accessible_by(current_ability).all.collect { |o| ["#{o.name} - #{o.active}", o.id] })