Skip to content

Commit

Permalink
Update survey index method to only include id, title, timestamp and url
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelynch committed Oct 11, 2023
1 parent 7826ed1 commit 2372c94
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/app/views/surveys/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# frozen_string_literal: true

json.array! @surveys, partial: 'surveys/survey', as: :survey
json.array! @surveys do |s|
json.id s.id
json.title s.title
json.updated_at s.updated_at
json.url survey_url(s.id, format: :json)
end

0 comments on commit 2372c94

Please sign in to comment.