Topic: Rails doesn't see my model changes

I have a model called AlirtTest and I'm trying to overwrite content_columns so I can strip out updated_at and created_at columns. However, any changes I make to the model don't seem to be actually doing anything. I even tried making a method called hate_you and if I try to call it I get an error saying it doesn't exist. Any ideas why? It's probably something really silly. I tried restarting Apache to regenerate caches and whatever...but it didn't help.

Re: Rails doesn't see my model changes

Got some anger issues with your models there eh? wink

Anyway, you're probably calling a class method, but are creating an instance method. Instead, you need to create a class method by adding "self." to the method definition. For example:

MyModel.content_columns

# will call
def self.content_columns
  #...
end

Railscasts - Free Ruby on Rails Screencasts

Re: Rails doesn't see my model changes

Nice, that did the trick. No more hate_you method. Thanks smile