-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #998 from ElixirTeSS/remove-json-ext
Strip `.json` extension from URLs returned from API endpoints
- Loading branch information
Showing
8 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
json.array!(@collections) do |collection| | ||
json.extract! collection, :id, :title, :description, :image_url | ||
json.url collection_url(collection, format: :json) | ||
json.url collection_url(collection) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
json.array!(@content_providers) do |content_provider| | ||
json.extract! content_provider, :id, :id, :title, :image_url, :description, | ||
:url, :created_at, :updated_at, :contact | ||
json.url content_provider_url(content_provider, format: :json) | ||
json.url content_provider_url(content_provider) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
json.array!(@learning_path_topics) do |learning_path_topic| | ||
json.extract! learning_path_topic, :id, :title, :description | ||
json.url learning_path_topic_url(learning_path_topic, format: :json) | ||
json.url learning_path_topic_url(learning_path_topic) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
json.array!(@nodes) do |node| | ||
json.extract! node, :id, :title, :description, :image_url, :events, :materials, :created_at, :updated_at | ||
json.url node_url(node, format: :json) | ||
json.url node_url(node) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
json.array!(@sources) do |source| | ||
json.extract! source, :content_provider, :created_at, :url, | ||
:method, :enabled | ||
json.url source_url(source, format: :json) | ||
json.url source_url(source) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
json.array!(users) do |user| | ||
json.extract! user, :id, :username | ||
json.extract! user.profile, :firstname, :surname if user.profile | ||
json.url user_url(user, format: :json) | ||
json.url user_url(user) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
json.array!(@workflows) do |workflow| | ||
json.extract! workflow, :id, :title, :description, :user_id, :workflow_content | ||
json.url workflow_url(workflow, format: :json) | ||
json.url workflow_url(workflow) | ||
|
||
json.partial! 'common/ontology_terms', type: 'scientific_topics', resource: workflow | ||
end |