mirror of
https://github.com/zhigang1992/qingshuiTemple.git
synced 2026-01-12 08:14:35 +08:00
switch to mongodb
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,3 +18,5 @@ capybara-*.html
|
||||
rerun.txt
|
||||
pickle-email-*.html
|
||||
.project
|
||||
|
||||
todo.md
|
||||
3
Gemfile
3
Gemfile
@@ -38,3 +38,6 @@ gem 'jbuilder', '~> 1.0.1'
|
||||
|
||||
# To use debugger
|
||||
# gem 'debugger'
|
||||
|
||||
# Mongodb
|
||||
gem 'mongoid', git: 'git://github.com/mongoid/mongoid.git', branch: '4.0.0-dev'
|
||||
|
||||
@@ -22,9 +22,15 @@ module QingshuiTemple
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
# config.time_zone = 'Central Time (US & Canada)'
|
||||
config.time_zone = 'Beijing'
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.default_locale = "zh-CN"
|
||||
|
||||
# Configure the default encoding used in templates for Ruby 1.9.
|
||||
config.encoding = "utf-8"
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
28
config/mongoid.yml
Normal file
28
config/mongoid.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
defaults: &defaults
|
||||
options:
|
||||
identity_map_enabled: true
|
||||
|
||||
development:
|
||||
<<: *defaults
|
||||
sessions:
|
||||
default:
|
||||
hosts:
|
||||
- 127.0.0.1:27017
|
||||
database: qingshui_temple_dev
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
sessions:
|
||||
default:
|
||||
hosts:
|
||||
- 127.0.0.1:27017
|
||||
database: qingshui_temple_test
|
||||
|
||||
# set these environment variables on your prod server
|
||||
production:
|
||||
<<: *defaults
|
||||
sessions:
|
||||
default:
|
||||
hosts:
|
||||
- 127.0.0.1:27017
|
||||
database: qingshui_temple
|
||||
Reference in New Issue
Block a user