Hi,
I have the following lifecyle:
-----------------------------------------------------
belongs_to :user, :creator => true
lifecycle do
state :requested, :purchased, :payed
create :request, :available_to => "User",
:become => :requested,
:user_becomes => :user,
:new_key => true
...
------------------------------------------------
When I try to create a model in the console with:
CreditTransaction::Lifecycle.request User.first
I get the following error:
ActiveRecord::AssociationTypeMismatch: User expected, got User
from
/home/tfranco/.rvm/gems/ruby-1.9.2-p136/bundler/gems/hobo-44c62e844f88/hobo/lib/hobo/extensions/active_record/associations/proxy.rb:19:in
`raise_on_type_mismatch'
from
/home/tfranco/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.3/lib/active_record/associations/belongs_to_association.rb:23:in
`replace'
from
/home/tfranco/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.3/lib/active_record/associations.rb:1474:in
`block in association_accessor_methods'
from
/home/tfranco/.rvm/gems/ruby-1.9.2-p136/bundler/gems/hobo-44c62e844f88/hobo/lib/hobo/model/accessible_associations.rb:152:in
`user_with_finder='
...
What am I doing wrong?
Thanks,
Tiago Franco
--
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.