I'm still struggling with the second part of my original post. Here is, 
basically, what I need to accomplish:

1. Admin can create a new user with default state set to :active (easy)
2. Admin can check a box on the *same new user form* to set the new user's 
state to :inactive and send the user an activation email instead. (having 
trouble)

I don't want to write a new "creator" in my lifecycle because I want to use 
the default "new user" form with its many existing fields. I don't want to 
specify everything in :params and then have to update it every time a new 
field is added to the user model. Also, I read in the manual that I can use 
a Proc with the :become option but I can't access the params hash (with my 
custom checkbox state) in the model to decide which state to "become". 
Lastly, if I try to set the lifecycle state as one of the :params for the 
creator, it still doesn't show up in the form.

In the controller, if I try to add some logic based on whether or not my 
checkbox is checked, I still can't seem to set the state directly to 
:inactive on the user, then send an email. But if I create a lifecycle 
transition to take care of that, I'm not sure how to (or if I can?) call it 
from the controller. 

If I'm going about this all wrong or if anyone has any other ideas, I'd be 
most grateful. Thanks again!

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/loQ8Gtsgdl0J.
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