Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Devise login form in another controller

I am trying to have the Devise log in form be on my home page.

When I just copy the form over, of course I get errors because the 'resource' variables and etc are not set in the action.

I found this solution on the internet: http://pupeno.com/blog/show-a-devise-log-in-form-in-another-page/

However, his solution is to set the needed variables in a module called ContentHelper.

Where do I put this code? I tried putting it in the initializers, but I still get the error about 'resource' variable not existing

like image 667
bwbrowning Avatar asked Nov 13 '10 18:11

bwbrowning


1 Answers

See if this entry in the devise wiki helps you!

https://github.com/plataformatec/devise/wiki/How-To:-Display-a-custom-sign_in-form-anywhere-in-your-app

like image 96
lmmendes Avatar answered Oct 29 '22 07:10

lmmendes