Fix that the options hash can be nil when coming from fragments
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
3335bd12c8
commit
40f67639c8
|
@ -31,9 +31,9 @@ module ActiveSupport
|
|||
# Set key = value if key isn't already set. Pass :force => true
|
||||
# to unconditionally set key = value. Returns a boolean indicating
|
||||
# whether the key was set.
|
||||
def write(key, value, options = {})
|
||||
def write(key, value, options = nil)
|
||||
super
|
||||
method = options[:force] ? :set : :add
|
||||
method = options && options[:force] ? :set : :add
|
||||
response = @data.send(method, key, value, expires_in(options), raw?(options))
|
||||
response == Response::STORED
|
||||
rescue MemCache::MemCacheError => e
|
||||
|
|
Loading…
Reference in New Issue