lib/active_remote/search.rb in active_remote-1.8.1 vs lib/active_remote/search.rb in active_remote-2.0.0.rc1
- old
+ new
@@ -1,17 +1,16 @@
require 'active_remote/persistence'
require 'active_remote/rpc'
module ActiveRemote
module Search
- def self.included(klass)
- klass.class_eval do
- extend ::ActiveRemote::Search::ClassMethods
- include ::ActiveRemote::Persistence
- include ::ActiveRemote::RPC
+ extend ActiveSupport::Concern
- define_model_callbacks :search
- end
+ included do
+ include Persistence
+ include RPC
+
+ define_model_callbacks :search
end
module ClassMethods
# Tries to load the first record; if it fails, an exception is raised.