upgrade to rails3, but grip is broken

This commit is contained in:
Wen-Tien Chang committed 2010-03-08 16:04:05 +08:00
1 parent 9f1de1b543
commit 29ee4585b2
53 files changed
+485 -1133

No files matched your search

+2 -2
View File
@@ -3,5 +3,5 @@
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,7 @@
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ActionController::Base.cookie_verifier_secret = 'cbf6409102b30cb9f4da455ee08c3a7e9d8b2a3d32a0e5b59a354dad03f469d363a8127ef4b7bc3b1afa632d7cf947a1e59e09022d2d4cd8df1f4fa521d7ec07'
+1 -1
View File
@@ -2,7 +2,7 @@
# four configuration values can also be set straight in your models.
Devise.setup do |config|
# Configure the e-mail address which will be shown in DeviseMailer.
# config.mailer_sender = "please-change-me@config-initializers-devise.com"
config.mailer_sender = "please-change-me@config-initializers-devise.com"
# ==> Configuration for :authenticatable
# Invoke `rake secret` and use the printed value to setup a pepper to generate
+28
View File
@@ -0,0 +1,28 @@
MongoMapper.connection = Mongo::Connection.new('localhost', 27017)
MongoMapper.database = "r4-#{Rails.env}"
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
MongoMapper.connection.connect_to_master if forked
end
end
module MongoMapper::Document::ClassMethods
def key_i18n(key, *options)
VALID_LOCALES.each do |locale|
key "#{key.to_s}_#{locale}".to_sym, *options
end
define_method(key) do
self.send("#{key.to_s}_#{I18n.locale}")
end
define_method("#{key}=") do |value|
VALID_LOCALES.each do |locale|
self.send("#{key.to_s}_#{locale}=", value)
end
end
end
end
+2 -2
View File
@@ -5,8 +5,8 @@
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ActionController::Base.session = {
:key => '_r4_session',
:secret => '1f062d6db3c797bea2da1ae0c82c0dd952833633fcfdda1e20baca0686bc2bee75aaa0db9ffe67e44655fad008fd1ddc5d670b051c7cf54ac6fa51c16dbe49fd'
:key => '_r4_session',
:secret => '3de7e1b7f4a979950642fd6ebf1a1f67488c568c7e510d7fe9011d6f8ad37e4195bc32aed07167ac7541b7b152d4ffbca73e05bd19d8faddff52b422f3851890'
}
# Use the database for sessions instead of the cookie-based default,