query calibre
This commit is contained in:
parent
99d802dd88
commit
50ece28ab6
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,3 +19,4 @@
|
|||||||
|
|
||||||
*~
|
*~
|
||||||
*.*.swp
|
*.*.swp
|
||||||
|
/vendor/ruby
|
||||||
|
@ -70,9 +70,11 @@ GEM
|
|||||||
mail (2.6.3)
|
mail (2.6.3)
|
||||||
mime-types (>= 1.16, < 3)
|
mime-types (>= 1.16, < 3)
|
||||||
mime-types (2.6.1)
|
mime-types (2.6.1)
|
||||||
|
mini_portile (0.6.2)
|
||||||
minitest (5.7.0)
|
minitest (5.7.0)
|
||||||
multi_json (1.11.1)
|
multi_json (1.11.1)
|
||||||
nokogiri (1.6.6.2)
|
nokogiri (1.6.6.2)
|
||||||
|
mini_portile (~> 0.6.0)
|
||||||
rack (1.6.4)
|
rack (1.6.4)
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
class StaticPagesController < ApplicationController
|
class StaticPagesController < ApplicationController
|
||||||
def home
|
def home
|
||||||
@title = "Home"
|
@title = "Home"
|
||||||
|
@books_count = Calibre::Book.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def about
|
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>
|
<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.
|
# Initialize the Rails application.
|
||||||
Rails.application.initialize!
|
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'
|
require 'magic_multi_connections'
|
||||||
|
|
||||||
module Calibre
|
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