Devise
Please review the general guide on how to integrate Devise into Matestack within the docs of matestack-ui-vuejs --> https://docs.matestack.io/matestack-ui-vuejs/integrations/devise
Below you find examples implementing typical Devise flows with matestack-ui-bootstrap
Devise Routes
app/config/routes.rb
Rails.application.routes.draw do
devise_for :users, controllers: {
sessions: 'users/sessions',
registrations: "users/registrations",
passwords: 'users/passwords'
}
# ...
endDevise Controllers
app/controllers/users/sessions_controller
class Users::SessionsController < Devise::SessionsController
respond_to :html, :json
# override in order to render a page
def new
render Devise::Pages::SignIn, matestack_layout: Devise::Layout
end
endapp/controllers/users/registrations_controller
app/controllers/users/passwords_controller.rb
Devise Pages Layout
app/matestack/devise/layout.rb
Login Page
app/matestack/devise/pages/sign_in.rb
Register Page
app/matestack/devise/pages/registration.rb
Registration Update
A registration update for a logged in user somewhere within your app could be approached like that:
Password Forgotten Page
app/matestack/devise/pages/passwords/forgot.rb
Passwords Edit Page
app/matestack/devise/pages/passwords/edit.rb
Last updated