Skip to content

Instantly share code, notes, and snippets.

@mattallen
Created November 25, 2011 01:20
Show Gist options
  • Save mattallen/1392604 to your computer and use it in GitHub Desktop.
Save mattallen/1392604 to your computer and use it in GitHub Desktop.
ActiveRecord::AssociationTypeMismatch in Admin::UsersController#update
ActiveRecord::AssociationTypeMismatch in Admin::UsersController#update
Channel(#2159242420) expected, got Channel(#2169779660)
only happens in dev, goes away if "config.cache_classes = true"
@suranyami
Copy link

Can you show us the code?

Might be that you're not getting the actual object, just the association. Happens sometimes when you forget to put a .first or .all on the end of something.

Just a wild stab...

@mattallen
Copy link
Author

It's actually happening in an active_admin controller so would be using it's default stuff.

It was bugging me, but i've moved on now. Just one of those annoyances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment