Story#104525318 - Domains import can handle legal documents import

This commit is contained in:
Vladimir Krylov 2016-01-27 17:05:56 +02:00
parent 550e4cc7b9
commit c089e032b5
3 changed files with 31 additions and 3 deletions

View file

@ -3,11 +3,12 @@ module Legacy
self.table_name = :files
def self.for_history history_id
history_ids = Array(history_id)
sql = %Q{select history.id, files.path, files.name, files.crdate
from history
join action ON action.id=history.action
join files on action.servertrid=files.servertrid
where history.id =#{history_id};}
where history.id IN (#{history_ids.join(",")});}
find_by_sql(sql).to_a
end
end