10.05.06

Posted in Rails at 10:48 pm by jasonb

Before I could start using acts_as_wizard a few things had to be changed. First, core_extensions.rb defined,

class Symbol
  def to_str
    id2name
  end
end

But its presence broke filtered_access plugin. The purpose of the above seemed identical to the existing Symbol#to_s, so I don’t know why it’s there. I commented it out.

Second, I had to change the only two instances of #to_str to #to_s, in action_view_extension.rb below.

    link_params[:controller] = step.controller.to_s
    link_params[:action] = step.actions.first.to_s

After that, things worked as advertised. Additionally, it’s undocumented, but you can override the default layout if you wish.

class AddPropertyWizard < Wizard::Base
        set_template 'vrl'
end

Ultimately, I decided to address my requirements using a different approach, but acts_as_wizard is an interesting plugin to examine. It overrides deep in Rails to perform its magic.

1 Comment »

  1. Paolo Dona said,

    October 8, 2006 at 10:23 am

    Hi Jason, nice to see you dug into my plugin. Would be even nicer if you could make some suggestion to improve it even further, don’t be shy and drop me a line (paolo.dona@seesaw.it).
    Thanks a lot in advance.

Leave a Comment

I'll protect you: the plenary Hash-cash.