Skip to content

Instantly share code, notes, and snippets.

@alexlafroscia
Created May 21, 2013 19:08
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 alexlafroscia/ae36bbba3571332afe19 to your computer and use it in GitHub Desktop.
Save alexlafroscia/ae36bbba3571332afe19 to your computer and use it in GitHub Desktop.
ActiveRecord::Reflection::ThroughReflection#foreign_key delegated to source_reflection.foreign_key, but source_reflection is nil: #<ActiveRecord::Reflection::ThroughReflection:0x007f9bccb9e5a0 @macro=:has_many, @name=:sports, @options={:through=>:favorites, :extend=>[]}, @active_record=User(id: integer, email: string, encrypted_password: string, name: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime, avatar_file_name: string, avatar_content_type: string, avatar_file_size: integer, avatar_updated_at: datetime, roles_mask: integer, teacher: boolean), @plural_name="sports", @collection=true, @source_reflection_names=[:sport, :sports], @through_reflection=#<ActiveRecord::Reflection::AssociationReflection:0x007f9bca80e798 @macro=:has_many, @name=:favorites, @options={:extend=>[]}, @active_record=User(id: integer, email: string, encrypted_password: string, name: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime, avatar_file_name: string, avatar_content_type: string, avatar_file_size: integer, avatar_updated_at: datetime, roles_mask: integer, teacher: boolean), @plural_name="favorites", @collection=true, @class_name="Favorite", @klass=Favorite(id: integer, user_id: integer, favoritable_id: integer, favoritable_type: string, created_at: datetime, updated_at: datetime), @foreign_key="user_id">, @source_reflection=nil>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment