lib/rbbt/rest/entity.rb in rbbt-rest-1.2.30 vs lib/rbbt/rest/entity.rb in rbbt-rest-1.2.31

- old
+ new

@@ -162,14 +162,16 @@ halt 200, list.info.to_json when :list content_type "text/plain" halt 200, list * "\n" when :name - content_type "text/plain" - halt 200, list.name * "\n" + name = list.name + a = name.list_link :length, list_id.sub(/ \(format:.*?\)|$/, " (format: Name)"), :ensembl => false + redirect to(a.match(/href=(["'])(.*?)\1/)[2]) when :ensembl - content_type "text/plain" - halt 200, list.ensembl * "\n" + ensembl = list.ensembl + a = ensembl.list_link :length, list_id.sub(/ \(format:.*?\)|$/, " (format: Ensembl)") + redirect to(a.match(/href=(["'])(.*?)\1/)[2]) else entity_list_render(list, list_id) end end