I am using Devise in my Rails application and I would like to customize its behavior. I read the documentation for devise_for . But I can not get it to use my user controllers. My routes look like this:
devise_for :users, controllers: { sessions: "users/sessions", registrations: "users/registrations" }
In my Users::RegistrationsController < Devise::RegistrationsController I tried the following:
# POST /resource def create puts "I'm here" # never happens! super end
Any ideas on what I am missing?
Update
Here is my file structure: 
Update 2
I think I could find the root of the problem. I visualize and submit my registration form in the Bootstrap module on a different route than the default path.
I submit the form along this path:
/apps/1/edit
And not:
users/sign_up
If I register this users/sign_up , it works and my methods are called. In my view /apps/1/edit I present the forms as follows:
= render "users/registrations/modal_form"
My editing action for my apps_controller (the action in which I submit the registration form) is currently empty:
The relevant parts of my users/registrations/modal_form are as follows:
.modal.fade#registrations_modal{ tabindex: -1, role: 'dialog', "aria-labelledby" [..] = render "users/registrations/new_form" [..]
And my users/registrations/new_form looks like this:
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = devise_error_messages! .form-group = f.label :name = f.text_field :name, autofocus: true, class: "form-control" .form-group = f.label :email = f.email_field :email, class: "form-control" .form-group = f.label :password - if @minimum_password_length %em (
I am not familiar with Devise. Any ideas on what and where am I missing something?
ruby ruby-on-rails devise
Anders
source share