activescaffold/active_scaffold — Issue #96: options_for_association_conditions - change in behavior
Author: jonmc12
Created: 2011-11-25 21:03:54+00:00
State: open

I was updating the activescaffold gem in my project - was using vhochstein branch. I'm getting unexpected behavior out of my active scaffolds that have nested helpers.

For instance, consider that a Project has many tasks, and they both use options_for_association_conditions in their helpers:

model ProjectsHelper
def options_for_association_conditions(association)
... code ...
end
end

module ProjectTasksHelper
def options_for_association_conditions(association)
if association.name == :test
... code ...
else
super
end
end
end

In the past, the 'super' method worked just fine. However, upon updating the gem, I must now call 'super association' or I will get the following error:

ActionView::Template::Error (wrong number of arguments (0 for 1)):

On the line

def options_for_association_conditions(association)

in ProjectsHelper

What is the proper way to chain associations the have nested helpers in the latest version of ActiveScaffold?