Flowdock
method

observer_class_for

Importance_0
v3.2.1 - Show latest stable - 0 notes - Class: ObserverArray
observer_class_for(observer) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/observer_array.rb, line 74
      def observer_class_for(observer)
        return observer if observer.is_a?(Class)

        if observer.respond_to?(:to_sym) # string/symbol
          observer.to_s.camelize.constantize
        else
          raise ArgumentError, "#{observer} was not a class or a " +
            "lowercase, underscored class name as expected."
        end
      end
Register or log in to add new notes.