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
79
Conhecendo o módulo Forwardable do Ruby
jackson_pires
0
65
COMO INSPIRAR PESSOAS E MONETIZAR O SEU CONHECIMENTO?
jackson_pires
0
56
Conhecendo a gem guard, guard-rspec e guard-livereload
jackson_pires
0
80
GDG Meetup - Carreiras em T.I.
jackson_pires
0
82
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
AIエージェント開発、DevOps and LLMOps
ymd65536
1
380
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
1k
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
1k
tool ディレクティブを導入してみた感想
sgash708
1
160
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
330
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
310
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
210
OSS開発者という働き方
andpad
5
1.6k
Trem on Rails - Prompt Engineering com Ruby
elainenaomi
1
100
為你自己學 Python - 冷知識篇
eddie
1
340
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
360
速いWebフレームワークを作る
yusukebe
5
1.6k
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Practical Orchestrator
shlominoach
190
11k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
A Tale of Four Properties
chriscoyier
160
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Facilitating Awesome Meetings
lara
55
6.5k
Music & Morning Musume
bryan
46
6.8k
A better future with KSS
kneath
239
17k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
How GitHub (no longer) Works
holman
315
140k
Agile that works and the tools we love
rasmusluckow
330
21k
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!