cannot find before_create

I am getting the warning "cannot find before_create" in my model. I am using RM 5.0.2

Any idea what may be causing it?


1 comment

I guess it is difficult for RM to find (or reach) callback functions as they are dynamically defined. Here is how/where before_create is defined:

.../activemodel-3.2.9/lib/active_model/callbacks.rb @ line 109:
Owner: #<Class:ActiveRecord::Base>
Visibility: public
Number of lines: 3

def self.before_#{callback}(*args, &block)
  set_callback(:#{callback}, :before, *args, &block)

Nonetheless, it would have been nice for RM to somehow recognize these callbacks as they are pretty well-known


Please sign in to leave a comment.