We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5688810 commit 2a2c21eCopy full SHA for 2a2c21e
1 file changed
app/controllers/application_controller.rb
@@ -105,9 +105,13 @@ def short_link
105
list = Register.where(accession: $1).first or not_found
106
redirect_to(register_path(list, par))
107
when /\Ag:([a-z]+):(.+)\z/i
108
- genome = Genome.where(database: $1, accession: $2).first or not_found
+ genome = Genome.where(database: $1, accession: $2).first
109
+ unless genome
110
+ $stderr.puts 'CANNOT FIND: %s | %s' % [$1, $2]
111
+ not_found
112
+ end
113
redirect_to(genome_path(genome, par))
- when /\Ag:(.+)\z/i
114
+ when /\Ag:(\d+)\z/i
115
genome = Genome.where(id: $1).first or not_found
116
117
when /\Ah:(.+)\z/i
0 commit comments