Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

This project is archived and is in readonly mode.

ActiveRecord::Observer.observe should take a String

#874

This method only supports a class or symbol. It is inconsistent with most other API's in that it does not take a String.

This also improves namespacing support. For example:


MyObserver.observe 'products/widget'

There is an observer test for active model, but none exists for active record's observer. Does this need a test?

Reported by matthuhiggins · August 20th, 2008 @ 10:03 PM

State: invalid
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to invalid
    • Assigned user set to Pratik

    Yup. A test would be needed. Also, following should work :

    
    MyObserver.observe :"products/widget"
    

    Will push the change once tests are added.

    Thanks.

    August 22nd, 2008 @ 02:38 AM