Using the rails logger in an non-AR model

How do I make my non-AR model have visibility to the rails logger? I
assume there is an include I need to use, but not sure what it is. I’m
also trying to get my error mailer working for any errors in my non-AR
models. Any help would be appreciated!

thx
phil

just declare

  logger = ActiveRecord::Base.logger

and then you can use logger normally.

-f

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs