Search backward compatibility
This commit is contained in:
parent
eaffa3a3c2
commit
53783db85a
@ -82,10 +82,14 @@ class DmsfFile < ActiveRecord::Base
|
|||||||
|
|
||||||
acts_as_event :title => Proc.new { |o| o.name },
|
acts_as_event :title => Proc.new { |o| o.name },
|
||||||
:description => Proc.new { |o|
|
:description => Proc.new { |o|
|
||||||
desc = Redmine::Search.cache_store.fetch("DmsfFile-#{o.id}")
|
if (Rails::VERSION::MAJOR > 3)
|
||||||
if desc
|
desc = Redmine::Search.cache_store.fetch("DmsfFile-#{o.id}")
|
||||||
Redmine::Search.cache_store.delete("DmsfFile-#{o.id}")
|
if desc
|
||||||
desc
|
Redmine::Search.cache_store.delete("DmsfFile-#{o.id}")
|
||||||
|
desc
|
||||||
|
else
|
||||||
|
o.description
|
||||||
|
end
|
||||||
else
|
else
|
||||||
o.description
|
o.description
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user