generate a scaffold for the topic resource and add registrations controller for overriding devise’s one
123456789101112131415161718192021222324
$railsgscaffoldtopictitle$railsgcontrollerregistrations# in registrations_controller.rbclassRegistrationsController<Devise::RegistrationsControllerprivatedefsign_up_paramsparams.require(:user).permit(:name,:email,:password,:password_confirmation)enddefaccount_update_paramsparams.require(:user).permit(:name,:email,:password,:password_confirmation,:current_password)endend# modify route.rbdevise_for:users,controllers:{registrations:"registrations"}root'topics#index'# add the following "before_action" to topics_conftroller.rb for forcing users logging inbefore_action:authenticate_user!