Commit 308b7f5e by Tan Phat Nguyen

Mysql install

parent df59f375
sample_app
......@@ -9,6 +9,7 @@ gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'rails-html-sanitizer', '1.0.1'
gem 'sdoc', '0.4.0', group: :doc
gem 'mysql2'
group :development, :test do
gem 'sqlite3', '1.3.9'
......
......@@ -106,6 +106,7 @@ GEM
minitest (>= 5.0)
ruby-progressbar
multi_json (1.10.1)
mysql2 (0.3.16)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
pg (0.17.1)
......@@ -202,6 +203,7 @@ DEPENDENCIES
jquery-rails (= 4.0.0.beta2)
mini_backtrace (= 0.1.3)
minitest-reporters (= 1.0.5)
mysql2
pg (= 0.17.1)
rails (= 4.2.0.beta4)
rails-html-sanitizer (= 1.0.1)
......
......@@ -7,4 +7,7 @@ class StaticPagesController < ApplicationController
def about
end
def contact
end
end
<% provide(:title, "Contact") %>
<h1>Contact</h1>
<p>
Contact the Ruby on Rails Tutorial about the sample app at the
<a href="http://www.railstutorial.org/#contact">contact page</a>.
</p>
\ No newline at end of file
......@@ -5,21 +5,23 @@
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
adapter: mysql2
username: root
password: root
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
database: venshop_dev
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
database: venshop_test
production:
<<: *default
database: db/production.sqlite3
database: venshop_production
......@@ -5,6 +5,7 @@ Rails.application.routes.draw do
get 'static_pages/help'
get 'static_pages/about'
get 'static_pages/contact'
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
......
require 'test_helper'
class StaticPagesControllerTest < ActionController::TestCase
def setup
@base_title = "Ruby on Rails Tutorial Sample App"
end
test "should get home" do
get :home
assert_response :success
assert_select "title", "Home | Ruby on Rails Tutorial Sample App"
assert_select "title", "Home | #{@base_title}"
end
test "should get help" do
get :help
assert_response :success
assert_select "title", "Help | Ruby on Rails Tutorial Sample App"
assert_select "title", "Help | #{@base_title}"
end
test "should get about" do
get :about
assert_response :success
assert_select "title", "About | Ruby on Rails Tutorial Sample App"
assert_select "title", "About | #{@base_title}"
end
test "should get contact" do
get :about
assert_response :success
assert_select "title", "Contact | #{@base_title}"
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment