I read all previous posts about the same subject in Devise group but
couldn't find any answer, so iy may not be related to Devise , so
I debugged it ..
.
class Users::RegistrationsController <
Devise::RegistrationsController
..
# POST /resource/sign_up
def create
build_resource
if resource.save
if resource.active?
set_flash_message :notice, :signed_up
sign_in_and_redirect(resource_name, resource)
else
set_flash_message :notice, :inactive_signed_up, :reason =>
resource.inactive_message.to_s
debugger
expire_session_data_after_sign_in!
redirect_to after_inactive_sign_up_path_for(resource)
end
else
clean_up_passwords(resource)
render_with_scope :new
end
end
the flash notice is set ... I checked it in the console:
>/users/registrations_controller.rb:27
>expire_session_data_after_sign_in!
>(rdb:2) flash {:notice=>"You have signed up successfully. However, we could
>not sign
you in because your account is unconfirmed."}
hiwever when the home page is displayed ... ( layout code ..)
#content_wrapper
#content
%p.notice
= flash.to_yaml
= notice
%p.alert
= alert
=
yield
and I got an empty flash ... (flash.to_yaml )
--- !map:ActionDispatch::Flash::FlashHash {}
I don't think the "expire_session_data_after_sign_in! " in the
controller doesn't any change (the flash notice is still there... )
but the redirection to the home page seems to get rid of it
redirect_to after_inactive_sign_up_path_for(resource)
is it a bug ? or missing piece of code ? thanks for your help , I
actually need to find a solution .. ( left this issue pending for a
while)
[Rails 3, Devise, haml, mongoid )
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.