Mailer file
button_to 'YES', lender_accept_url(borrow), method: :post, id: "accept #{borrow.id}", style: "background-color:green; color: white; width: 40px; display: inline"
button_to 'NO', lender_decline_url(borrow), method: :post, id: "decline #{borrow.id}", style: "background-color:gray; width: 40px; display: inline"
Routes
post 'inventories/:id/accept', to: 'inventories#accept', as: 'lender_accept'
post 'inventories/:id/decline', to: 'inventories#decline', as: 'lender_decline'
However, when I click a button in the email, it takes me to http://example.com/inventories/:id/decline
Why is the URL helper not leading to my own domain? Note, this same partial used in the Mailer file is also used in a regular view page, and on that page, the routes work fine.