undefined method `finished='
Opened this issue · 0 comments
oliverbarnes commented
Hello,
I'm trying to implement a wizard that permits editing of the resource after finishing the form, as per comments on this issue:
http://github.com/jeffp/wizardly/issues#issue/2/comment/66081
but I'm hitting the following error when submitting or even just hitting the 'back' commit:
NoMethodError in CompaniesController#step5 undefined method `finished=' for # RAILS_ROOT: /Users/oliver/Sites/trabalhe-conosco Application Trace | Framework Trace | Full Trace /Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:255:in `method_missing' /Users/oliver/Sites/trabalhe-conosco/app/controllers/companies_controller.rb:5:in `_on_step5_form_finish' (eval):179:in `send' (eval):179:in `callback_performs_action?' (eval):29:in `step5' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `send' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `perform_action_without_filters' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in `call_filters' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:10:in `realtime' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in `perform_action_without_flash' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `send' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process_without_filters' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `process' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in `process' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in `call'
here's my implementation:
class CompaniesController < ApplicationController act_wizardly_for :company on_finish(:step5) do do_not_complete @company.finished = true @company.save #or save_without_validation redirect_to :step1 end end
any pointers would be greatly appreciated :)
thanks for the great gem, btw.