example/rails3/app/controllers/application_controller.rb in rest-more-2.0.4 vs example/rails3/app/controllers/application_controller.rb in rest-more-3.0.0
- old
+ new
@@ -39,14 +39,11 @@
def cache
url = rc_facebook.url('cache')
rc_facebook.get('cache').tap{}
rc_facebook.get('cache').tap{}
- key = RC::Cache.new(nil, nil, nil).cache_key(
- rc_facebook.dry.call(
- RC::REQUEST_METHOD => :get,
- RC::REQUEST_PATH => rc_facebook.url('cache'),
- &RC::Middleware.id))
+ res = rc_facebook.request_full(RC::REQUEST_PATH => url)
+ key = RC::Cache.new(nil, nil, nil).cache_key(res)
render :text => Rails.cache.read(key)
end
def error
raise RestCore::Facebook::Error.new("don't rescue me")