hubfeenix.fi/app/views/entities/_form.html.haml

17 lines
511 B
Plaintext

= simple_form_for @entity do |f|
- if @entity.errors.any?
#error_explanation
%h2= "#{pluralize(@entity.errors.count, "error")} prohibited this entity from being saved:"
%ul
- @entity.errors.full_messages.each do |message|
%li= message
.field
= f.input :name
.field
= f.input :ha_id , collection: Entity.ha_entities
.field
= f.input :member_id , collection: Member.all.collect{|m| [m.name , m.id ]}
.actions{class: button_classes}
= f.submit 'Save'