lib/active_remote/search.rb in active_remote-2.4.0 vs lib/active_remote/search.rb in active_remote-3.0.0.pre1
- old
+ new
@@ -6,23 +6,13 @@
extend ActiveSupport::Concern
included do
include Persistence
include RPC
-
- define_model_callbacks :search
end
module ClassMethods
-
- # :noapi:
- def _active_remote_search_args(args)
- warn "DEPRECATED Model._active_remote_search_args is depracted and will be remoted in Active Remote 3.0."
-
- validate_search_args!(args)
- end
-
# Tries to load the first record; if it fails, an exception is raised.
#
# ====Examples
#
# # A single hash
@@ -100,11 +90,10 @@
response = rpc.execute(:search, args)
if response.respond_to?(:records)
records = serialize_records(response.records)
- records.each { |record| record.run_callbacks :search }
end
end
# Validates the given args to ensure they are compatible
# Search args must be a hash or respond to to_hash
@@ -117,18 +106,9 @@
raise "Invalid parameter: #{args}. Search args must respond to :to_hash."
end
end
args
- end
- end
-
- # :noapi:
- def _active_remote_search(args)
- warn "DEPRECATED Model#_active_remote_search is depracted and will be remoted in Active Remote 3.0."
-
- run_callbacks :search do
- rpc.execute(:search, args)
end
end
# Reload this record from the remote service.
#