example/rails2/app/controllers/application_controller.rb in rest-graph-1.7.0 vs example/rails2/app/controllers/application_controller.rb in rest-graph-1.8.0

- old
+ new

@@ -1,15 +1,9 @@ -# Filters added to this controller apply to all controllers in the application. -# Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base - helper :all # include all helpers, all the time - protect_from_forgery # See ActionController::RequestForgeryProtection for details + protect_from_forgery - # Scrub sensitive parameters from your log - # filter_parameter_logging :password - include RestGraph::RailsUtil before_filter :filter_common , :only => [:index] before_filter :filter_canvas , :only => [:canvas] before_filter :filter_options , :only => [:options] @@ -52,10 +46,19 @@ def error raise RestGraph::Error.new("don't rescue me") end + def reinitialize + cache_nil = rest_graph.cache + rest_graph_setup(:cache => {'a' => 'b'}) + cache = rest_graph.cache + render :text => YAML.dump([cache_nil, cache]) + end + + def helper; end + private def filter_common rest_graph_setup(:auto_authorize => true, :canvas => '') end @@ -69,10 +72,9 @@ :auto_authorize_scope => 'email') end def filter_iframe_canvas rest_graph_setup(:canvas => 'zzz', - :iframe => true, :auto_authorize => true) end def filter_no_auto rest_graph_setup(:auto_authorize => false)