I want to get table name in a model method. I found there should be method table_name but when I try to call it I get NameError Exception: undefined local variable or method `ta
Found it.
It's a class method. Its not so obvious from the Rails 3 documentation.
self.class.table_name