Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Session fixed :)

  • Loading branch information...
commit a450a85a23ab8f57a50711e8f41956f52c9334e0 1 parent 65af141
@tibastral authored
Showing with 44 additions and 44 deletions.
  1. +1 −1  app/controllers/sessions_controller.rb
  2. +43 −43 db/schema.rb
View
2  app/controllers/sessions_controller.rb
@@ -4,7 +4,7 @@ class SessionsController < ApplicationController
def create
auth = request.env["omniauth.auth"]
- user = User.find_by_provider_and_uid(auth["provider"], auth["uid"]) || User.create_with_omniauth(auth)
+ user = User.find_by_provider_and_uid(auth["provider"], auth["uid"].to_s) || User.create_with_omniauth(auth)
session[:user_id] = user.id
redirect_to root_url, :notice => "Authentification réussie !"
end
View
86 db/schema.rb
@@ -14,14 +14,14 @@
ActiveRecord::Schema.define(:version => 20130307175541) do
create_table "active_admin_comments", :force => true do |t|
- t.integer "resource_id", :null => false
- t.string "resource_type", :null => false
- t.integer "author_id"
- t.string "author_type"
- t.text "body"
- t.timestamp "created_at"
- t.timestamp "updated_at"
- t.string "namespace"
+ t.integer "resource_id", :null => false
+ t.string "resource_type", :null => false
+ t.integer "author_id"
+ t.string "author_type"
+ t.text "body"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "namespace"
end
add_index "active_admin_comments", ["author_type", "author_id"], :name => "index_active_admin_comments_on_author_type_and_author_id"
@@ -29,53 +29,53 @@
add_index "active_admin_comments", ["resource_type", "resource_id"], :name => "index_admin_notes_on_resource_type_and_resource_id"
create_table "admin_users", :force => true do |t|
- t.string "email", :default => "", :null => false
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
- t.string "reset_password_token"
- t.timestamp "reset_password_sent_at"
- t.timestamp "remember_created_at"
- t.integer "sign_in_count", :default => 0
- t.timestamp "current_sign_in_at"
- t.timestamp "last_sign_in_at"
- t.string "current_sign_in_ip"
- t.string "last_sign_in_ip"
- t.timestamp "created_at"
- t.timestamp "updated_at"
+ t.string "email", :default => "", :null => false
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
+ t.string "reset_password_token"
+ t.datetime "reset_password_sent_at"
+ t.datetime "remember_created_at"
+ t.integer "sign_in_count", :default => 0
+ t.datetime "current_sign_in_at"
+ t.datetime "last_sign_in_at"
+ t.string "current_sign_in_ip"
+ t.string "last_sign_in_ip"
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
add_index "admin_users", ["email"], :name => "index_admin_users_on_email", :unique => true
add_index "admin_users", ["reset_password_token"], :name => "index_admin_users_on_reset_password_token", :unique => true
create_table "events", :force => true do |t|
- t.timestamp "occured_at"
- t.string "title"
- t.string "url"
- t.timestamp "created_at", :null => false
- t.timestamp "updated_at", :null => false
+ t.datetime "occured_at"
+ t.string "title"
+ t.string "url"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "presentations", :force => true do |t|
- t.string "name"
- t.string "title"
- t.string "email"
- t.timestamp "created_at"
- t.timestamp "updated_at"
- t.date "occured_at"
- t.integer "length"
- t.integer "difficulty"
- t.string "slides_url"
- t.string "video_url"
- t.text "notes"
- t.integer "event_id"
- t.integer "user_id"
+ t.string "name"
+ t.string "title"
+ t.string "email"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.date "occured_at"
+ t.integer "length"
+ t.integer "difficulty"
+ t.string "slides_url"
+ t.string "video_url"
+ t.text "notes"
+ t.integer "event_id"
+ t.integer "user_id"
end
create_table "sponsors", :force => true do |t|
- t.string "name"
- t.date "from"
- t.date "until"
- t.timestamp "created_at", :null => false
- t.timestamp "updated_at", :null => false
+ t.string "name"
+ t.date "from"
+ t.date "until"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
Please sign in to comment.
Something went wrong with that request. Please try again.