That helped. Thanks.

For anyone else having this problem, apparently there isn't a
well-documented way to turn this off. However, you can add the following to
ApplicationController (or a subclass of).

# disable implicit helper(:all) in rails3
clear_helpers

Reference:
http://www.shopify.com/technology/3033502-shopifys-path-to-rails-3
http://api.rubyonrails.org/classes/AbstractController/Helpers/ClassMethods.html#method-i-clear_helpers


On Sat, Jun 18, 2011 at 5:36 AM, vhochstein <[email protected]>wrote:

> Hi,
>
> rails 3 is including all helpers as a default.
>
> Either, turn off that feature
> or, define only one method name_column and do a case statement by
> record class.
>
> --
> Volker
>
> On 17 Jun., 16:00, Nick Rogers <[email protected]> wrote:
> > In active_scaffold vhochstein fork under rails 3.0.5, if you create a
> form
> > or column helper method override for two different scaffold controllers
> > having an attribute with the same name, they overwrite one another.
> >
> > For example, using volker's demo app.
> >
> > # is NEVER called for players scaffold
> > module PlayersHelper
> >   def name_column(record)
> >     "a Player: #{record.name}"
> >   end
> > end
> >
> > # this is called by teams AND players scaffold
> > module TeamsHelper
> >   def name_column(record)
> >     "a Team: #{record.name}"
> >   end
> > end
> >
> > Players
> > *Name* Date of birth Injured Salary Team Created at Updated at
> > *a Team*: nick - 0.000 test Tue, 14 Jun 2011 14:57:20 +0000 Tue, 14 Jun
> 2011
> > 14:57:52 +0000 Edit Delete Show
> >
> > I'm having similar problems with my rails 2.3 app that I'm trying to
> convert
> > to rails 3. Is this a rails3 problem, active_scaffold issue, or something
> > I'm doing incorrectly? Thanks.
>
> --
> 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.
>
>

-- 
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.

Reply via email to