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