Skip to content

Commit

Permalink
Session fixed :)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibastral committed Mar 8, 2013
1 parent 65af141 commit a450a85
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
86 changes: 43 additions & 43 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,68 +14,68 @@
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"
add_index "active_admin_comments", ["namespace"], :name => "index_active_admin_comments_on_namespace"
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|
Expand Down

0 comments on commit a450a85

Please sign in to comment.