File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def send_submitted_notice_copy(notice)
1717 end
1818
1919 mail (
20- to : notice . submitter . user . widget_submissions_forward_email ,
20+ to : notice . submitter . users . first . widget_submissions_forward_email ,
2121 subject : subject
2222 )
2323 end
@@ -27,7 +27,7 @@ def send_submitted_notice_copy(notice)
2727 def notice_for_email ( notice )
2828 entities_fields = %w[ name kind address_line_1 address_line_2 state country_code phone email url city zip ]
2929
30- notice . as_json (
30+ json = notice . as_json (
3131 only : %w[ id title body created_at subject language jurisdictions tags type mark_registration_number ] ,
3232 include : {
3333 submitters : {
@@ -44,16 +44,19 @@ def notice_for_email(notice)
4444 } ,
4545 attorneys : {
4646 only : entities_fields
47- } ,
48- works : {
49- only : [ :description ] ,
50- include : {
51- infringing_urls : { only : %i[ url ] } ,
52- copyrighted_urls : { only : %i[ url ] }
53- }
5447 }
5548 }
5649 )
50+
51+ json [ :works ] = notice . works . map do |work |
52+ {
53+ description : work . description ,
54+ infringing_urls : work . infringing_urls . map ( &:url ) ,
55+ copyrighted_urls : work . copyrighted_urls . map ( &:url )
56+ }
57+ end
58+
59+ json
5760 end
5861
5962 def json_to_html ( hash )
You can’t perform that action at this time.
0 commit comments