Oh yeah, this is line 64: old_state.exited(record) unless
loopback
On Jun 12, 5:41 pm, Mindtonic
<mindto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> NoMethodError in FeedsController#do_validate
>
> You have a nil object when you didn''t expect it!
> The error occurred while evaluating nil.exited
>
> RAILS_ROOT: /Users/jaysanders/Sites/rss/trunk
> Application Trace | Framework Trace | Full Trace
>
> vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
> 64:in `perform''
> vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
> 94:in `fire''
> vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
> 93:in `each''
> vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
> 93:in `fire''
> vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:
> 201:in `validated!''
> app/controllers/feeds_controller.rb:103:in `do_validate''
>
> ==>
> def do_validate
> @feed = Feed.find(params[:id])
> @feed.cache_feed
>
> if @feed.feed_cache
> @feed.validated!
> else
> @feed.invalidated!
> end
>
> respond_to do |format|
> format.js { render :text => @feed.state }
> end
> end
>
> ==>
> acts_as_state_machine :initial => :submitted
> state :valid_address
> state :invalid_address
> state :readable_feed
> state :unreadable_feed
> state :active
> state :invalid
>
> event :validated do
> transitions :from => :submitted, :to =>
:valid_address
> end
>
> ==>
> Any ideas? If I comment out line 64 from acts_as_state_machine.rb,
> everything works beautifully. What am I missing? Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---