プラグイン名
Acts as Authenticated
このプラグインができること
- ログイン画面と認証済みかどうか判定する仕組みの提供
- 新規ユーザ登録画面
- 認証メール送信
- ユーザ情報変更用のメソッド提供
対象バージョン
1.2系
インストール方法
- script/pluginでsubversionリポジトリを指定
ちょー簡単な使い方
でインストールして
script/generate authenticated user account
と
rake db:migrate
すると、ユーザ管理用テーブルとモデル、accountコントローラーが生成される。
/accountにアクセスすると、ログイン及びユーザ登録が可能。
公式ページ
日本語解説ページ
有名系だけあって解説ページも多いけど、ここが一番丁寧かも。
外国語解説ページ
のうはう
class CreateUsers < ActiveRecord::Migration
def self.up
create_table "users", :force => true do |t|
t.column :login, :string
t.column :email, :string
t.column :crypted_password, :string, :limit => 40
t.column :salt, :string, :limit => 40
t.column :created_at, :datetime
t.column :updated_at, :datetime
t.column :remember_token, :string
t.column :remember_token_expires_at, :datetime
end
end
def self.down
drop_table "users"
end
end
コメント
最終更新:2008年08月18日 17:17