Skip to content

Commit

Permalink
Hide works_json field from admin
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-hank committed Mar 2, 2022
1 parent 66cf1ee commit 07d5133
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/elasticsearch/searchability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def define_elasticsearch_mapping(exclusions = {})
out = as_json(except: [:jurisdiction_list, :regulation_list, :tag_list])

attributes_to_skip = %w[review_required reviewer_id url_count
webform notes views_overall views_by_notice_viewer]
webform notes views_overall views_by_notice_viewer
works_json]
out.except!(*attributes_to_skip)

out['class_name'] = self.class.name
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/rails_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
configure(:type) do
hide
end

configure :reset_type, :enum do
label 'Type'
required true
Expand All @@ -178,6 +179,10 @@
ability.can? :rescind, Notice
end
end

configure(:works_json) do
hide
end
end
end
end
Expand Down

0 comments on commit 07d5133

Please sign in to comment.