Skip to content

Commit

Permalink
Merge pull request #562 from griffithlab/source-links
Browse files Browse the repository at this point in the history
add support for source permalink styles
  • Loading branch information
acoffman authored Jun 17, 2022
2 parents fc10d75 + 456aceb commit 365d79b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/app/lib/link_adaptors/source.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module LinkAdaptors
class Source < Base
def display_name
obj.display_name
end

def base_path
"/sources/#{obj.id}"
end
end
end
2 changes: 2 additions & 0 deletions server/app/models/frontend_router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def query_info
[ Drug, :id ]
when /assertions?/
[ Assertion, :id ]
when /sources?/
[ Source, :id ]
when /allele_registry/
[ Variant, :allele_registry_id, ]
when /id/
Expand Down

0 comments on commit 365d79b

Please sign in to comment.