mail_view
mail_view copied to clipboard
I have to restart my environment to make mail_preview loading changes
Steps to reproduce:
- Executing this code which has an error
class MailPreview < MailView
def invitation
this_will_raise_an_error!!
account = Account.first
inviter, invitee = account.users[0, 2]
Notifier.invitation(inviter, invitee)
end
end
- Then removing the
this_will_raise_an_error!!
The error persists until I restart the server
How should it behave?
I shouldn't need to restart the server in order to make the MailPreview execute without the "this_will_raise_an_error!!" line
This is probably a bug in Mail View that is triggered when config.eager_load = true. In my case, I was able to delete the whole MailPreview file after starting the Rails server and still view mail previews.
You can work around it with config.eager_load = false in development.rb.