id is hard coded as the primary key. Nothing wrong normally but I have this legacy database ported to Rails that doesn't respond to @instance.id.
It fails in many levels but the first would be here:
https://github.com/davidcelis/recommendable/blob/master/lib/recommendable/rater/bookmarker.rb#L74
If my primary key is a string like 'AAPL' then calling to_i on it returns 0. Hence requesting all bookmarks for a specific user will trigger:
Where there are no columns id for companies AND there wouldn't be an id for 0.
Would be great if either we could pass as an option to recommends or if it could look at ActiveRecord relationships:
has_many :companies, primary_key: :ticker