We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6011e9a commit 962ec7fCopy full SHA for 962ec7f
1 file changed
app/controllers/application_controller.rb
@@ -108,11 +108,9 @@ def short_link
108
genome = Genome.where(id: $1).first or not_found
109
redirect_to(genome_path(genome, par))
110
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
+ db, acc = [$1, $2]
+ acc += '.' + par[:format] if par[:format].present?
+ genome = Genome.where(database: db, accession: acc).first or not_found
116
117
when /\Ah:(.+)\z/i
118
redirect_to(help_path($1, par))
0 commit comments