Hi all. Been using Hobo for quite a while. I had an app that I
updated to 1.0 and it's running well, accept users can't login. They
get the "Account is not available. Your account is not available at
this time." page since the old model I updated didn't have a
lifecycle, therefore no users are "Active" according to the hobo
magic. I've been trying, but failing to force the users (on save,
etc... since I can edit the reords) to become active to no avail.
Anyone know of a quick way to force existing users to become active?
I tried to to create a new transition and fire it off on save like so,
but it didn't work:
before_save :update_active_status
def update_active_status
self.lifecycle.activate!(self)
end
lifecycle do
state :active, :default => true
transition :request_password_reset, { :active
=> :active }, :new_key => true do
UserMailer.deliver_forgot_password(self, lifecycle.key)
end
transition :reset_password, { :active => :active }, :available_to
=> :key_holder,
:params => [ :password, :password_confirmation ]
transition :activate, { :active => :active }, :become => :active
end
--
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.