Rails nested forms with pre-defined fields as checkboxes
问题 I'm making a hotel app that includes Room and RoomAttribute models. The two models have a many_to_many relationship between each other through a join table. The attributes for each model are as follows: Room – room_number , room_type (e.g. "deluxe" or "suite"), and price . RoomAttributes – name (e.g. "Wireless Internet", "Cable TV", "Bath Tub"). The user will first create a set of room attributes, so that these can be selected as checkboxes every time a new room is created. For example, some