- model_class = Drink
- content_for :actions do
  %li.nav-item
    = link_to 'new drink', [:new, :drink], class: "nav-link"

.page-header
  %h1
    Drinks.
    %small All of them!

%table.table.table-striped.table-bordered
  %thead
    %tr
      %th
        = model_class.human_attribute_name(:logo)
        %span.small
          (click to edit drink)
      %th= model_class.human_attribute_name(:name)
      %th= model_class.human_attribute_name(:bottle_size)
      %th= model_class.human_attribute_name(:caffeine)
      %th= model_class.human_attribute_name(:price)
      %th= model_class.human_attribute_name(:created_at)
  %tbody
    - @drinks.each do |drink|
      %tr
        %td
          = link_to [:edit, drink] do
            = image_tag drink.logo(:thumb), class: drink.active ? "" : "disabled"
        %td= drink.name
        %td= drink.bottle_size
        %td= drink.caffeine
        %td= show_amount drink.price
        %td
          %span{ :title => l(drink.created_at)}= l(drink.created_at, format: :short)

- model_class = Drink
- content_for :actions do
  %li.nav-item
    = link_to 'new drink', [:new, :drink], class: "nav-link"

.page-header
  %h1
    Drinks.
    %small All of them!

%table.table.table-striped.table-bordered
  %thead
    %tr
      %th
        = model_class.human_attribute_name(:logo)
        %span.small
          (click to edit drink)
      %th= model_class.human_attribute_name(:name)
      %th= model_class.human_attribute_name(:bottle_size)
      %th= model_class.human_attribute_name(:caffeine)
      %th= model_class.human_attribute_name(:price)
      %th= model_class.human_attribute_name(:created_at)
  %tbody
    - @drinks.each do |drink|
      %tr
        %td
          = link_to [:edit, drink] do
            = image_tag drink.logo(:thumb), class: drink.active ? "" : "disabled"
        %td= drink.name
        %td= drink.bottle_size
        %td= drink.caffeine
        %td= show_amount drink.price
        %td= drink.created_at.strftime("%d %b %Y - %H:%M")

Change the drink overview to show full dates
Change the drink overview to show full dates
