Skip to content

Instantly share code, notes, and snippets.

@chrisyeung1121
Created August 11, 2015 08:49
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 chrisyeung1121/6ba92a2ddbe620f1cf58 to your computer and use it in GitHub Desktop.
Save chrisyeung1121/6ba92a2ddbe620f1cf58 to your computer and use it in GitHub Desktop.
Algolia nested attributes error
class Car < ActiveRecord::Base
belongs_to :owner, class_name: 'FormUser', foreign_key: 'user_id'
include AlgoliaSearch
algoliasearch id: :permalink do
attribute :owner do
{ uid: owner.uid }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment