I have the following working class Preview:
class UserMailerPreview < ActionMailer::Preview
def invite
USerMailer.invite
end
end
I am trying to pass parameters to a method as follows:
localhost:3000/rails/mailers/user_mailer/invite?key1=some_value
The server seems to have received them:
Parameters: {"key1"=>"some_value", "path"=>"user_mailer/invite"}
But when I try to access them with a hash params, I get an error message.
Can I access these options in preview mode, and if so, how?
source
share