change function def self.table_name to self.table_name

change def self.primary_key to self.primary_key