Growstuff/growstuff

View on GitHub
app/views/crops/_approval_status_message.html.haml

Summary

Maintainability
Test Coverage
- if crop.pending?
  .alert.alert-danger
    %b This crop is currently pending approval.
    %p This crop was requested by #{crop.requester} #{time_ago_in_words(crop.created_at)} ago.
    - unless crop.request_notes.blank?
      %p
        Request notes: #{crop.request_notes}

- if crop.rejected?
  .alert.alert-danger
    %b This crop was rejected for the following reason: #{crop.rejection_explanation}