mail_view icon indicating copy to clipboard operation
mail_view copied to clipboard

I have to restart my environment to make mail_preview loading changes

Open tonatiuh opened this issue 11 years ago • 1 comments

Steps to reproduce:

  1. 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
  1. 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

tonatiuh avatar May 20 '14 16:05 tonatiuh

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.

patbl avatar Nov 05 '14 20:11 patbl