How to configure registration using the utility on Rails?

I am currently working on a Rails project and decided to use Devise to register a user. The site uses MongoDB (mangoid stone), and I plan to create a simple registration / login system.

So, on the home page there is a link that allows the user to click on it or open it on another tab. If he decides to click on it, there should be a modal popup that contains fields and a registration button, etc. If he opens a new tab, he should see a highlighted page for the registration process.

So here is what I still have. I installed the program and can register correctly. However, I also want to create a modal effect in which I used the jQuery UI dialog attached to the registration link. Then I loaded the login page (/ user / sign-up) using dialog.load ("path") and split the layout when it is an ajax request.

I know this is not the best method to use, so I am reluctant. Is there a better way to do this? Preferably a standard method. Any help would be appreciated, or just point me in the right direction. The tutorials will be very enjoyable and helpful. Thank you very much in advance!

+4
source share
1 answer

I'm not sure if I understand this question, but try this. Run

rails generate devise:views 

Creating development views.

In the folder views/devise/registration you will find the registration page. You should now have access to both the form code and the user_session path to /users/sign_in .

You now have a form and a path so you can play with AJAXifying.

0
source

All Articles