Skip to content

Commit

Permalink
loading Xapit::Membership into ActiveRecord deeper in so it happens f…
Browse files Browse the repository at this point in the history
…or gems as well as plugins
  • Loading branch information
ryanb committed Jun 15, 2009
1 parent c9317a4 commit 5f84b8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
ActiveRecord::Base.class_eval do
include Xapit::Membership
end
require 'xapit'
6 changes: 6 additions & 0 deletions lib/xapit/membership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,9 @@ def xapit_facet_blueprint(attribute)
end
end
end

if defined? ActiveRecord
ActiveRecord::Base.class_eval do
include Xapit::Membership
end
end

0 comments on commit 5f84b8e

Please sign in to comment.