タグ

ブックマーク / blog.netswitch.jp (3)

  • netswitch! | 決定版! Rails用画像添付プラグインpurl

    Rails pluginとして動く言語、purlを公開しました。 purl はクライアントサイドから柔軟な画像処理を行うために開発されました。 サムネイルの生成などを行うプラグインはいくつかありますが、そのどれよりも強力で汎用性、拡張性があります。 セットアップ Rails2.1以上では、 $ script/plugin install git://github.com/nanki/purl.git それ未満では、 $ git clone git://github.com/nanki/purl.git -- vendor/plugins/purl gitが無い環境なら、githubのdownloadからファイルを落として、vendor/plugins/ に配置してください。 依存ライブラリ 必須: ImageMagick, rmagick あった方がいい: cairo, rcairo その

  • netswitch! | Rails Plugin - ActiveRecord拡張系2

    :clear_after_save => trueを指定すると、save後はmodified?がtrueじゃなくなる。 person = Person.find(:first) person.age # 100 person.age = 10 person.age_modified? # true person.original_age # 100 person.modified_attributes # {:age => 100} # restore person.restore_attributes :only => :age person.age # 100 # clear person.clear_original_attributes :only => :age # dbと比較 person.modified?(:reload) # true

  • netswitch! | Rails Plugins...:

    edit Rails Plugins... Posted by nanki Sat, 14 Jan 2006 13:10:00 GMT ユーザ認証をプラグインを使って作ろうと思ったんだけど、 すると、たくさんでてきてどれが何やらさっぱり。 そこでまとめてみた。 認証系 account_location アカウント毎にサブドメインがあるような、スコープ付の認証に。 acts_as_authenticated script/generate authenticated user account で認証機能が作れる メール認証を使ったアクティベーションも作れる generator を使うので、既存のクラスに機能追加するのはできない? login_engine # in config/environment.rb module LoginEngine config :salt, "your-sal

  • 1