<% Property.sorted.each do |property| %>
<% selected = if @prototype.new_record?
(params[:property] and params[:property][:id] and params[:property][:id].include?(property.id.to_s))
else
@prototype.properties.include?(property)
end %>
<% end %>
<%= t("option_types") %>
<% OptionType.all.each do |option_type| %>
<% selected = if @prototype.new_record?
(params[:option_type] and params[:option_type][:id] and params[:option_type][:id].include?(option_type.id.to_s))
else
@prototype.option_types.include?(option_type)
end %>