mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-27 11:14:31 -04:00
Improved program efficiency (in querying in particular) by replacing .count and .length with .size for collections. Fix error in refactoring Reverted some .size into .count
23 lines
729 B
Plaintext
23 lines
729 B
Plaintext
= form_for @notification do |f|
|
|
- if @notification.errors.any?
|
|
#error_explanation
|
|
%h2= "#{pluralize(@post.errors.size, "error")} prohibited this message from being sent:"
|
|
%ul
|
|
- @notification.errors.full_messages.each do |msg|
|
|
%li= msg
|
|
|
|
.field
|
|
= f.hidden_field :recipient_id, :value => @recipient.id
|
|
|
|
%p
|
|
To:
|
|
= link_to @recipient, @recipient
|
|
= label_tag :notification, "Subject:"
|
|
= f.text_field :subject, :value => @subject, :class => 'form-control'
|
|
= label_tag :body, "Type your message here:"
|
|
= f.text_area :body, :rows => 12, :class => 'form-control'
|
|
%span.help-block
|
|
= render :partial => "shared/markdown_help"
|
|
|
|
= f.submit "Send", :class => 'btn btn-primary'
|