Skip to content

Instantly share code, notes, and snippets.

@carlhoerberg
Created October 7, 2010 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlhoerberg/614933 to your computer and use it in GitHub Desktop.
Save carlhoerberg/614933 to your computer and use it in GitHub Desktop.
module ActiveSupport
module Inflector
alias :old_foreign_key :foreign_key
def foreign_key(class_name, separate_class_name_and_id_with_underscore = true)
old_foreign_key(class_name, false)
end
def tableize(class_name)
class_name
end
end
end
module ActiveRecord
class Base
class << self
def get_primary_key(base_name) #:nodoc:
"Id"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment