Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ruby on Rails para Iniciantes - Aula 38
Search
Jackson Pires
May 06, 2015
Programming
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby on Rails para Iniciantes - Aula 38
Autenticação de Usuários com Devise (Básico)
Jackson Pires
May 06, 2015
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
100
Conhecendo o módulo Forwardable do Ruby
jackson_pires
0
80
COMO INSPIRAR PESSOAS E MONETIZAR O SEU CONHECIMENTO?
jackson_pires
0
71
Conhecendo a gem guard, guard-rspec e guard-livereload
jackson_pires
0
91
GDG Meetup - Carreiras em T.I.
jackson_pires
0
100
20 minutos insanos de TDD e Ruby
jackson_pires
0
130
Ruby on Rails para Iniciantes - Aula 46
jackson_pires
0
180
Ruby on Rails para Iniciantes - Aula 47
jackson_pires
0
93
Ruby on Rails para Iniciantes - Aula 48
jackson_pires
0
380
Other Decks in Programming
See All in Programming
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
golang-bob.pdf
iwatsukayura
0
130
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
AWSに止められる覚悟してますか?
morizo_1984
2
540
contenteditable と日本語入力に向き合う
colorful12
0
200
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
すこし踏み込む CancellationToken
htkym
2
1.7k
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
BBQ
matthewcrist
90
10k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
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!