Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #107 from dakull/master

Make recommendable with ActiveRecord UUIDs
  • Loading branch information...
commit b041960dc68f7201a65438080e468e4b82e59cac 2 parents 60d752d + 4d59c0a
@davidcelis authored
View
2  lib/recommendable/helpers/queriers.rb
@@ -6,6 +6,8 @@ def active_record(klass, ids)
klass.where(:id => ids)
end
+ alias_method :active_record_uuid, :active_record
+
def data_mapper(klass, ids)
klass.all(:id => ids)
end
View
6 lib/recommendable/orm/active_record_uuid.rb
@@ -0,0 +1,6 @@
+require 'active_record'
+
+ActiveRecord::Base.send(:include, Recommendable::Rater)
+ActiveRecord::Base.send(:include, Recommendable::Ratable)
+
+Recommendable.configure { |config| config.orm = :active_record_uuid }
Please sign in to comment.
Something went wrong with that request. Please try again.