Skip to content

Instantly share code, notes, and snippets.

@jonhinson
Created February 3, 2010 20:41
Show Gist options
  • Save jonhinson/293998 to your computer and use it in GitHub Desktop.
Save jonhinson/293998 to your computer and use it in GitHub Desktop.
module ActiveRecord
module Associations
module ClassMethods
private
@@valid_keys_for_belongs_to_association = [
:class_name, :primary_key, :foreign_key, :foreign_type, :remote, :select, :conditions,
:include, :dependent, :counter_cache, :extend, :polymorphic, :readonly, :joins, # added :joins key
:validate, :touch
]
@@valid_keys_for_has_many_association = [
:class_name, :table_name, :foreign_key, :primary_key,
:dependent,
:select, :conditions, :include, :order, :group, :having, :limit, :offset, :joins, # added :joins key
:as, :through, :source, :source_type,
:uniq,
:finder_sql, :counter_sql,
:before_add, :after_add, :before_remove, :after_remove,
:extend, :readonly,
:validate
]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment