I have no idea where to submit a patch. If this is the right place, please, point me to it. Thank you.
This also fixes the issue reported here http://groups.google.com/group/activescaffold/t/28d6da6428988ed8?hl=en The problem was that the action_methods contained in the ActiveScaffold::Actions::Nested::ChildMethods where loaded too late. Now it works. Please let me know whether or not it will be applied in the master branch. Thank you. <pre> ====================== >From 1700dea2adfc40eb3e17536ebffdf2a2835bf145 Mon Sep 17 00:00:00 2001 From: dd <[email protected]> Date: Tue, 7 Apr 2009 23:36:36 -0400 Subject: [PATCH] Fix for broken nested child actions --- lib/active_scaffold/actions/nested.rb | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/active_scaffold/actions/nested.rb b/lib/ active_scaffold/actions/nested.rb index b59a025..f579aa9 100644 --- a/lib/active_scaffold/actions/nested.rb +++ b/lib/active_scaffold/actions/nested.rb @@ -4,6 +4,9 @@ module ActiveScaffold::Actions def self.included(base) super + base.module_eval do + include ActiveScaffold::Actions::Nested::ChildMethods + end base.before_filter :include_habtm_actions # TODO: it's a bit wasteful to run this routine every page load. base.before_filter :links_for_associations @@ -66,11 +69,6 @@ module ActiveScaffold::Actions active_scaffold_config.action_links.delete("destroy") if active_scaffold_config.action_links['destroy'] end - self.class.module_eval do - include ActiveScaffold::Actions::Nested::ChildMethods - # we need specifically to tell action_controller to add these public methods as action_methods - ActiveScaffold::Actions::Nested::ChildMethods.public_instance_methods.each {|m| self.action_methods.add m } - end unless self.class.included_modules.include? (ActiveScaffold::Actions::Nested::ChildMethods) else # Production mode is caching this link into a non nested scaffold active_scaffold_config.action_links.delete('new_existing') if active_scaffold_config.action_links['new_existing'] -- 1.6.1.9.g97c34 </pre> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
