Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby on Rails para Iniciantes - Aula 38
Search
Jackson Pires
May 06, 2015
Programming
0
520
Ruby on Rails para Iniciantes - Aula 38
Autenticação de Usuários com Devise (Básico)
Jackson Pires
May 06, 2015
Tweet
Share
More Decks by Jackson Pires
See All by Jackson Pires
Como usar uma box Vagrant com a Cloud9 IDE para desenvolver com Elixir ou Phoenix?
jackson_pires
0
80
Conhecendo o módulo Forwardable do Ruby
jackson_pires
0
66
COMO INSPIRAR PESSOAS E MONETIZAR O SEU CONHECIMENTO?
jackson_pires
0
57
Conhecendo a gem guard, guard-rspec e guard-livereload
jackson_pires
0
80
GDG Meetup - Carreiras em T.I.
jackson_pires
0
84
20 minutos insanos de TDD e Ruby
jackson_pires
0
110
Ruby on Rails para Iniciantes - Aula 46
jackson_pires
0
160
Ruby on Rails para Iniciantes - Aula 47
jackson_pires
0
80
Ruby on Rails para Iniciantes - Aula 48
jackson_pires
0
370
Other Decks in Programming
See All in Programming
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
520
Leading Effective Engineering Teams in the AI Era
addyosmani
7
470
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
230
Devvox Belgium - Agentic AI Patterns
kdubois
1
130
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
270
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.9k
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
1k
overlayPreferenceValue で実現する ピュア SwiftUI な AdMob ネイティブ広告
uhucream
0
190
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
610
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
860
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
240
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
1
690
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.5k
The Cost Of JavaScript in 2023
addyosmani
55
9k
4 Signs Your Business is Dying
shpigford
185
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
For a Future-Friendly Web
brad_frost
180
10k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
It's Worth the Effort
3n
187
28k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Building an army of robots
kneath
306
46k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
470
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Transcript
Ruby on Rails Para iniciantes - 3a Temporada \o/
http://videosdeti.com.br
[email protected]
Mentoring
Patrocinadores Roger Bernardi
Aula 38 Autenticação de usuários com Devise (básico)
Ruby on Rails Index Customer Products
Ruby on Rails Index Customer Products Usuários Autenticados
Ruby on Rails Devise
Ruby on Rails Adicione ao Gemfile... gem 'devise'
Ruby on Rails Rode o bundle install
Ruby on Rails Rode o gerador do Devise rails generate
devise:install
Ruby on Rails Adicione o devise ao Model rails generate
devise User
Ruby on Rails Verifique os módulos que deseja ativar
Ruby on Rails Rode a migração para a nova tabela
Users rake db:migrate
Ruby on Rails Ajuste os ambientes para o envio de
email config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
Ruby on Rails Adicione o filtro nos controllers que deseja
autenticação before_action :authenticate_user!
Ruby on Rails Index Customer Products Usuários Autenticados
Ruby on Rails Tente acessar os cadastros envolvidos
Ruby on Rails Verifique as novas rotas rake routes
Ruby on Rails Crie os links para o cadastro de
novos usuários
Ruby on Rails Entenda os helpers user_signed_in? / current_user user_session
Ruby on Rails Para customizar as Views acesse o initializer
do devise config/initializers/devise.rb
Ruby on Rails Ative a opção de scoped_view config.scoped_views =
true
Ruby on Rails Gere as views e faça as alterações
rails generate devise:views users
Ruby on Rails Obrigado!