2008-12-23から1日間の記事一覧

rubyからpostgres

sudo gem install postgres -- --with-opt-include=/opt/local/include/postgresql83 --with-opt-lib=/opt/local/lib/postgresql83で、インストールするとオッケー。パスの中にバージョン番号が入っているので、バージョンアップの際は注意。

postgresql on osx 10.5 with port

$ sudo port install postgresql83-serverでインストールすると、こんなメッセージが出た。 ########################################################### # A startup item has been generated that will aid in # starting postgresql83-server with laun…

selectable_attrって何さ?

定数定義を分かりやすくするために僕が作っているプラグインです。こんな風に思う方に強くオススメです。 マジックナンバーを撲滅したい 値とプログラム上での記述と表示上の名称をひとまとめに書きたい select_tagとかに渡す選択肢(option_tags)をいちいち…

selectable_attrのi18n対応

selectable_attrのi18n対応を行いました。ja.ymlや、en.ymlなどに en: selectable_attrs: enum1: entry1: xxx entry2: yyy entry3: zzzって感じで名称を書いておけば、I18n.localeに従ってその名称を使うようになります。詳しくはテストで。 http://github.c…