Newer
Older
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class RegistrationsController < Devise::RegistrationsController
def new
super
end
def create
Jamie Wilkinson
a validé
begin
rescue MongoMapper::DocumentNotValid => e
user = nil
flash[:error] = e.message
end
if user
flash[:notice] = I18n.t 'registrations.create.success'
Jamie Wilkinson
a validé
redirect_to new_user_registration_path