Hi Ricardo,
Maybe there is some migration you need to run in the production server?
An easy approach to debug this would be addings some loggers:
def index
logger.info "Info about the current user: #{current_user.inspect}
logger.info "login_primera_vez: #{current_user.login_primera_vez.inspect}"
..... And the rest of your code ......
Then you can take a look at log/production.log and see what's going on.
Regards,
Ignacio
El 26/07/13 01:55, Ricardo escribió:
> I've changed the index action on the front controller to be able to
> force my users to change their password the first time they login.
>
> def index
>
> if current_user.guest?
>
> elsif current_user.login_primera_vez == true
> redirect_to '/front/force_password_change'
> else
>
> end
>
> end
>
> This works in my computer in development environment but when I upload
> it to the production server it simply ignores it.
> I'm using rails 3.0.11 and hobo 1.3.
>
>
> ------------------------------------------------------------------------
> Este mensaje (incluyendo cualquier archivo adjunto) contiene información
> confidencial que se encuentra protegida por la Ley. Si usted no es el
> destinatario, o por error recibe el mensaje, por favor elimínelo y
> notifique al emisor original de inmediato. Cualquier divulgación,
> difusión, distribución, retención y/o copias del contenido se encuentra
> estrictamente prohibido.
>
> Abstenerse de incluir al final/pie de los correos, mensajes de tipo
> político y/o religioso, ya que los mismos no estan relacionados con
> nuestro trabajo.
>
> Antes de imprimir este correo, por favor considere si es verdaderamente
> necesario.*
> *
>
> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.