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
72
Conhecendo o módulo Forwardable do Ruby
jackson_pires
0
60
COMO INSPIRAR PESSOAS E MONETIZAR O SEU CONHECIMENTO?
jackson_pires
0
54
Conhecendo a gem guard, guard-rspec e guard-livereload
jackson_pires
0
78
GDG Meetup - Carreiras em T.I.
jackson_pires
0
70
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
78
Ruby on Rails para Iniciantes - Aula 48
jackson_pires
0
360
Other Decks in Programming
See All in Programming
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
960
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
260
Оптимизируем производительность блока Казначейство
lamodatech
0
860
GitHubで育つ コラボレーション文化 : ニフティでのインナーソース挑戦事例 - 2024-12-16 GitHub Universe 2024 Recap in ZOZO
niftycorp
PRO
0
1k
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
740
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
410
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
6
1.3k
return文におけるstd::moveについて
onihusube
1
1.4k
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
340
Go の GC の不得意な部分を克服したい
taiyow
3
960
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.3k
テストケースの名前はどうつけるべきか?
orgachem
PRO
1
180
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Producing Creativity
orderedlist
PRO
343
39k
Designing Experiences People Love
moore
139
23k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Making the Leap to Tech Lead
cromwellryan
133
9k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Scaling GitHub
holman
459
140k
Being A Developer After 40
akosma
89
590k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Adopting Sorbet at Scale
ufuk
74
9.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Bash Introduction
62gerente
609
210k
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!