tamacyaのブック
(185 keywords)

最新日記

RSS
  • 日記はまだありません

tamasally のお気に入り

  • shinout.knowledge shinout.knowledge
  • マインディアからのお知らせ マインディアからのお知らせ
  • あきくもちゃのブック あきくもちゃのブック
  • tnantoka tnantoka

tamacyaのブックのメンバー

  • 西小倉パンデイロ 西小倉パンデイロ
  • 里香 里香
  • なおき なおき
  • gacky gacky

rails BASIC認証の履歴

authenticate_or_request_with_http_basicを使う。
すごく簡単だった。

app/controllers/application_controller.rb

class ApplicationController < ActionController::Base
before_filter :authenticate

private
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == 'ユーザー名' && password == 'パスワード'
end
end
end