Ruby on Rails OpenID

From SubfireWiki

Jump to: navigation, search

Background

Install

sudo gem install -y ruby-openid
sudo gem install openid_login_generator

Migration

Instead of creating the table by hand, I did

  • created file: db/migrate/002_create_users.rb: (Note: the 002 will be different based on the project)
class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :openid_url, :string
    end
  end

  def self.down
    drop_table :users
  end
end
  • then performed, in the root of the project:
rake migrate
Personal tools