show book

This commit is contained in:
Meutel 2015-06-28 14:29:09 +02:00
parent 50ece28ab6
commit ea6326612a
7 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the books controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,7 @@
class BooksController < ApplicationController
def show
@book = Calibre::Book.find(params[:id])
end
end

View File

@ -0,0 +1,2 @@
module BooksHelper
end

View File

@ -0,0 +1 @@
<h1><%= @book.title %></h1>

View File

@ -3,6 +3,8 @@ Rails.application.routes.draw do
get 'static_pages/about'
resources :books
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".

View File

@ -0,0 +1,7 @@
require 'test_helper'
class BooksControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end