suakx devlog

開発ブログのような

3 notes &

rails3.0betaでauthlogicを試してみました

せっかくなのでrails3の勉強もかねてauthlogicが使えるかどうか試してみました。今のところ大丈夫そうです。rails3がでるまでにログイン認証のつくり込みができればと考えています。

前回作成した環境で動かしています。Lucid alpha 3+ruby1.9.1+rails3.0betaです。3月21日時点、Lucid alpha 3インスコ後sudo aptitude updateとsudo aptitude upgradeをかますとvm上でも画面が表示されるようになってます。

ではスタート。

rails r3b_authtest
rails plugin install git://github.com/binarylogic/authlogic.git

あとは基本的に
http://github.com/binarylogic/authlogic_example
こちらのコードのコピペです。
http://github.com/suakx/r3b_authtest/tree/version-0.0.1
にコードはおいてあります。 

変更した点は2カ所

config/application.rb

config/routes.rb

routes.rbはかなりの変更がありました。
http://edgeguides.rubyonrails.org/routing.html
http://railscasts.com/episodes/203-routing-in-rails-3
あたりが参考になるでしょう。

次回はちゃんとログイン、ログアウトを作成予定です。

  1. noplans reblogged this from hishochi
  2. hishochi reblogged this from waku
  3. waku reblogged this from devlog
  4. devlog posted this