Skip to content

Instantly share code, notes, and snippets.

@slawosz
Created June 9, 2010 11:37
Show Gist options
  • Save slawosz/431354 to your computer and use it in GitHub Desktop.
Save slawosz/431354 to your computer and use it in GitHub Desktop.
From 930c2177ffa6b560c7718974f52be2b20f149dcb Mon Sep 17 00:00:00 2001
From: =?utf-8?q?S=C5=82awosz=20S=C5=82awi=C5=84ski?= <slawosz@slawosz-laptop.(none)>
Date: Wed, 9 Jun 2010 15:42:47 +0200
Subject: [PATCH] render signature compatible with rails
---
vendor/plugins/rubyamf/util/action_controller.rb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/vendor/plugins/rubyamf/util/action_controller.rb b/vendor/plugins/rubyamf/util/action_controller.rb
index bf82ead..cfd79ae 100755
--- a/vendor/plugins/rubyamf/util/action_controller.rb
+++ b/vendor/plugins/rubyamf/util/action_controller.rb
@@ -1,7 +1,7 @@
require 'app/request_store'
require 'app/configuration'
ActionController::Base.class_eval do
- def render_with_amf(options = nil, &block)
+ def render_with_amf(options = nil, extra_options = {}, &block)
begin
if options && options.is_a?(Hash) && options.keys.include?(:amf)
#set the @performed_render flag to avoid double renders
@@ -10,7 +10,7 @@ ActionController::Base.class_eval do
RubyAMF::App::RequestStore.render_amf_results = options[:amf]
RubyAMF::Configuration::ClassMappings.current_mapping_scope = options[:class_mapping_scope]||RubyAMF::Configuration::ClassMappings.default_mapping_scope
else
- render_without_amf(options,&block)
+ render_without_amf(options, extra_options, &block)
end
rescue Exception => e
#suppress missing template warnings
@@ -58,4 +58,4 @@ private
return HashWithIndifferentAccess.new({:username => remote_auth[0], :password => remote_auth[1]})
end
end
-end
\ No newline at end of file
+end
--
1.6.3.3
@vcastellm
Copy link

Have you tested it agains the trunk?

@slawosz
Copy link
Author

slawosz commented Jun 9, 2010

Im testing it now, and it is still broken. Im trying to fix it now.
I need this patch to make devise work with amf app.

@vcastellm
Copy link

OK, thank you for the effort. Should be great to have Devise working on top of ramf, tell me when it's working and I'll apply the patch to the trunk asap.

@slawosz
Copy link
Author

slawosz commented Jun 9, 2010

I have updated gist, and this patch works with devise in my app. On another app it works.
But I think it is highly recommend to test this patch on some other apps, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment