Hello,

I have message model where a recipient or author can delete a message.
Is it possible to control this logic with lifecycles? If I add a
second lifecycle to my model hobe gives me an error:

script/generate hobo_migration
Invalid field type: nil for Message.recipient_deleted

  lifecycle(:state_field => "author_deleted") do
    state :false, :true
    transition :delete, { :false => :true }, :available_to => :author
    transition :undelete, { :true => :false }, :available_to
=> :author
  end

  lifecycle(:state_field => "recipient_deleted") do
    state :false, :true
    transition :delete, { :false => :true }, :available_to
=> :recipient
    transition :undelete, { :true => :false }, :available_to
=> :recipient
  end


Best regards.
Asbjørn Morell.

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