Skip to content

Commit

Permalink
Fix shared bulk error template
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Nov 22, 2024
1 parent d604a53 commit 59ac224
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def collection
end

def errors_template
'buyers/applications/bulk/shared/errors.html'
'buyers/applications/bulk/shared/errors'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def recipients
end

def errors_template
'buyers/accounts/bulk/shared/errors.html'
'buyers/accounts/bulk/shared/errors'
end
end
3 changes: 2 additions & 1 deletion app/controllers/buyers/bulk_base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def send_emails
message = current_account.messages.build send_email_params
message.to = recipient

@errors << recipient unless message.save && message.deliver!
# @errors << recipient unless message.save && message.deliver!
@errors << recipient
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def collection
end

def errors_template
'buyers/service_contracts/bulk/shared/errors.html'
'buyers/service_contracts/bulk/shared/errors'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def recipients
end

def errors_template
'buyers/accounts/bulk/shared/errors.html'
'buyers/accounts/bulk/shared/errors'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setup
action: 'create'
}
assert_response :unprocessable_entity
assert_template 'buyers/service_contracts/bulk/shared/errors.html'
assert_template 'buyers/service_contracts/bulk/shared/errors'
end

test '#new renders with the display_name in the title of the contract' do
Expand Down

0 comments on commit 59ac224

Please sign in to comment.