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
56
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
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
220
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
140
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
960
Swift Concurrency - 状態監視の罠
objectiveaudio
2
490
オープンソースソフトウェアへの解像度🔬
utam0k
12
2.4k
Conquering Massive Traffic Spikes in Ruby Applications with Pitchfork
riseshia
0
160
CSC305 Lecture 05
javiergs
PRO
0
210
CSC305 Lecture 04
javiergs
PRO
0
260
Catch Up: Go Style Guide Update
andpad
0
210
チームの境界をブチ抜いていけ
tokai235
0
150
CSC305 Lecture 06
javiergs
PRO
0
210
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
1.8k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Typedesign – Prime Four
hannesfritz
42
2.8k
Thoughts on Productivity
jonyablonski
70
4.9k
Docker and Python
trallard
46
3.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
It's Worth the Effort
3n
187
28k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Into the Great Unknown - MozCon
thekraken
40
2.1k
How to Think Like a Performance Engineer
csswizardry
27
2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Balancing Empowerment & Direction
lara
4
680
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!