The answer to this question specifically mentions using the params [:body-plain]
. However, Rails throws this error: NameError (undefined local variable or method 'plain' for #<IncomingMailsController:0x0000000913f278>):
How can I access params that have a hyphen in? I can't change the params as they're posted from a third party API (Mailgun).
You need to access them like this:
params[:'body-plain']
Or even just like this:
params["body-plain"]
You have to escape your symbol
name if it contains special characters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With