Skip to content

Commit 962ec7f

Browse files
committed
Update application_controller.rb
1 parent 6011e9a commit 962ec7f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,9 @@ def short_link
108108
genome = Genome.where(id: $1).first or not_found
109109
redirect_to(genome_path(genome, par))
110110
when /\Ag:([a-z]+):(.+)\z/i
111-
genome = Genome.where(database: $1, accession: $2).first
112-
unless genome
113-
logger.error('FORMAT: %s' % [par[:format]])
114-
not_found
115-
end
111+
db, acc = [$1, $2]
112+
acc += '.' + par[:format] if par[:format].present?
113+
genome = Genome.where(database: db, accession: acc).first or not_found
116114
redirect_to(genome_path(genome, par))
117115
when /\Ah:(.+)\z/i
118116
redirect_to(help_path($1, par))

0 commit comments

Comments
 (0)