query calibre
This commit is contained in:
parent
99d802dd88
commit
50ece28ab6
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,3 +19,4 @@
|
||||
|
||||
*~
|
||||
*.*.swp
|
||||
/vendor/ruby
|
||||
|
@ -70,9 +70,11 @@ GEM
|
||||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
mime-types (2.6.1)
|
||||
mini_portile (0.6.2)
|
||||
minitest (5.7.0)
|
||||
multi_json (1.11.1)
|
||||
nokogiri (1.6.6.2)
|
||||
mini_portile (~> 0.6.0)
|
||||
rack (1.6.4)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
|
@ -1,6 +1,7 @@
|
||||
class StaticPagesController < ApplicationController
|
||||
def home
|
||||
@title = "Home"
|
||||
@books_count = Calibre::Book.count
|
||||
end
|
||||
|
||||
def about
|
||||
|
2
app/models/book.rb
Normal file
2
app/models/book.rb
Normal file
@ -0,0 +1,2 @@
|
||||
class Book < ActiveRecord::Base
|
||||
end
|
@ -1,2 +1,2 @@
|
||||
<h1>Welcome</h1>
|
||||
<p>Coming soon, an e-book library</p>
|
||||
<p><%= @books_count %> books in library</p>
|
||||
|
@ -4,6 +4,8 @@ require File.expand_path('../application', __FILE__)
|
||||
# Initialize the Rails application.
|
||||
Rails.application.initialize!
|
||||
|
||||
ENV['GEM_PATH']='/home/meutel/gems/:/usr/local/lib/ruby/gems/2.1/'
|
||||
ENV['GEM_HOME']='/home/meutel/gems'
|
||||
require 'magic_multi_connections'
|
||||
|
||||
module Calibre
|
||||
|
7
test/models/book_test.rb
Normal file
7
test/models/book_test.rb
Normal file
@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class BookTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
Loading…
Reference in New Issue
Block a user