lifecycle do
    state :viewable, :default => true

    create :send_email, :params => [:contact ],
           :become => :viewable, :new_key => true do
      Mailer.deliver_email(self, lifecycle.key)
    end

This worked with 0.8.3 but with 0.8.4 errors out because state is not
available in create:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym

RAILS_ROOT: /home/betelgeuse/mailer
Application Trace | Framework Trace | Full Trace

/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/
lifecycle.rb:144:in `state_name'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/
lifecycle.rb:210:in `key'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/
lifecycle.rb:201:in `generate_key'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/actions.rb:
98:in `prepare!'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/creator.rb:
52:in `run!'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/permissions.rb:139:in
`with_acting_user'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/creator.rb:
51:in `run!'
/usr/lib/ruby/gems/1.8/gems/hobo-0.8.4/lib/hobo/lifecycles/
lifecycle.rb:97:in `create'
(eval):3:in `send_email'

I am guessing this should work with 0.8.4 too or am I doing something
wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to