Minimum needed to observe a model

I have a model called Post and a observer called PostObserver. I also
have in environment.rb file the line:

config.active_record.observers = :post_observer

I read that observers default to the model with the same name, but the
model class isn’t being observed.

Observe works if I put in the ForumController:

observer :post_observer

But this doesn’t seem right.

Jose

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