Your SlideShare is downloading. ×
0
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Aplicações tipo Canvas no Redu com Rails
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Aplicações tipo Canvas no Redu com Rails

96

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
96
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Aplicações tipo Canvas comRailsGuilherme CavalcantiLíder técnico, plataforma de aplicativosThursday, 28 February 13
  • 2. ContextoThursday, 28 February 13
  • 3. O que já aprendemos?Assunto Nº de AulasIntrodução ao Ruby 1REST e OAuth 1Consumindo APIs REST com Ruby 1Introdução ao Rails 2Uso do canvas 1Componentes de interface do Redu 2Thursday, 28 February 13
  • 4. Na aula de hoje• OAuth no Rails• Aplicações tipo Canvas no Rails• Uso do Redu BootstrapThursday, 28 February 13
  • 5. OAuth no RailsThursday, 28 February 13
  • 6. Temos um Gem paraisso :)omniauth-reduThursday, 28 February 13
  • 7. 1: Gemfile1 source https://rubygems.org23 gem rails, ~> 3.2.104 gem omniauth-redu• Adicionar gem omniauth-reduThursday, 28 February 13
  • 8. 1: routes.rb1 Autoregulation::Application.routes.draw do2 match /auth/:provider/callback, :to => sessions#create3 match /auth/:provider, :to => sessions#create, as: :create_session4 end• Rota que dá início a autenticação• Rota de callbackThursday, 28 February 13
  • 9. 1: Controller1 class SessionsController < BaseController2 def create3 @user = User.find_by_uid(auth_hash[uid]) ||4 User.create_with_omniauth(auth_hash)56 session[:user_id] = @user.id78 redirect_to root_path9 end1011 protected1213 def auth_hash14 request.env[omniauth.auth]15 end16 endThursday, 28 February 13
  • 10. ReferênciaautorregulacaoThursday, 28 February 13

×