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

Aplicações tipo Canvas no Redu com Rails

on

  • 269 views

 

Statistics

Views

Total Views
269
Views on SlideShare
269
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Aplicações tipo Canvas no Redu com Rails Aplicações tipo Canvas no Redu com Rails Presentation Transcript

    • Aplicações tipo Canvas comRailsGuilherme CavalcantiLíder técnico, plataforma de aplicativosThursday, 28 February 13
    • ContextoThursday, 28 February 13
    • 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
    • Na aula de hoje• OAuth no Rails• Aplicações tipo Canvas no Rails• Uso do Redu BootstrapThursday, 28 February 13
    • OAuth no RailsThursday, 28 February 13
    • Temos um Gem paraisso :)omniauth-reduThursday, 28 February 13
    • 1: Gemfile1 source https://rubygems.org23 gem rails, ~> 3.2.104 gem omniauth-redu• Adicionar gem omniauth-reduThursday, 28 February 13
    • 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
    • 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
    • ReferênciaautorregulacaoThursday, 28 February 13