asm-products/verba

View on GitHub
app/views/admin/prompts/index.html.haml

Summary

Maintainability
Test Coverage
%section.flex-center--column
  = form_for @prompt, url: admin_prompts_path do |f|
    = f.text_field :content
    = f.submit

  .prompt-of-the-day
    %h3 Prompt of the Day
    %p
      = Prompt.today.content
    %h3 On deck
    %p
      = Prompt.on_deck.content

  %table.admin__prompts
    %tr
      %th Content
      %th Used
    - @prompts.each do |prompt|
      %tr
        %td= prompt.content
        %td= prompt.used