22 February 2015 I thought I’d take a little break from blogging about iOS app development to write about how I added authentication to a Ruby web application recently. I’m a big fan of the Sinatra micro framework for when the full-stack Ruby on Rails framework is too heavyweight. I like Sinatra because it makes writing simple (or fairly simple) web applications really easy, whilst allowing you to
railsでログインシステムを試してみたのでメモ. コード自体は「Railsによるアジャイルwebアプリケーション開発」の第14章タスク:ログインとほぼ同じ. 本格的なログイン機能が必要な場合プラグインを使う.Deviseというプラグインが人気らしい. 環境はRuby1.9.3p286とRails3.2.8 Gemfileに gem 'bcrypt-ruby' を追加してinstallしておく $rails g controller home indexしておく,index.html.erbを編集する. index.html.erb <h1>ログインシステムのテスト</h1> <ul> <li><a href="#">ログイン</a></li> <li><a href="#">ログアウト</a></li> </ul> webアプリには管理者と一般ユーザがいる.Userモデルが必要である.今
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く