smc/grandham

View on GitHub
app/views/publishers/show.html.haml

Summary

Maintainability
Test Coverage
.row
  = render partial: 'publisher_nav_links', locals: {activated_page: :show, publisher: @publisher }

%br

.row
  .col-md-8

    %h2= @publisher.name
    %p= @publisher.place
    %br
    %h4= "Books"

    - @publisher.books.first(10).each do |book|
      = render partial: 'common/book', locals: { book: book }

    - if @publisher.books.count > 10
      %br
        = link_to 'more..', books_language_publisher_path(@publisher.language, @publisher)

  .col-md-4
    .pull-right
      = image_tag publisher_logo(@publisher), class: 'img-thumbnail'