This article was migrated from http://rails.office.drecom.jp/hibi/archive/29

備忘録。これは便利!
Rubyレシピブック 268の技のレシピNo.111です。

array = [1, 2, 3]
str = array.join(",")
p str        #"1, 2, 3"


http://rails.office.drecom.jp/hibi/archive/29

This article was migrated from http://rails.office.drecom.jp/hibi/archive/29

posted by Png satoko on Thu 14 Sep 2006 at 14:51

This article was migrated from http://rails.office.drecom.jp/hibi/archive/28

ActiveRecord::Baseにfind_or_create_by_カラム名というのがあるらしい。

探して、なかったら作るという便利なもの。
AWDRにも載ってないみたいだし。

ノグはすごいねー http://rails.office.drecom.jp/hibi/archive/28

This article was migrated from http://rails.office.drecom.jp/hibi/archive/28

posted by Png satoko on Thu 14 Sep 2006 at 12:46

This article was migrated from http://rails.office.drecom.jp/hibi/archive/27

家のネットワークでは、DHCPを利用していたのですが、
Windows->DebianにアクセスするのにIPアドレスが毎回変わるため、
windowsのhostsを変更したりととても面倒。
瀧内さんに相談したところ、固定できますよという話!


DebianはNATを使用。

下記のファイルを編集。
#/etc/network/interfaces
--------------------------------------------------
# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255 #ここは255を使うのが定石
gateway 192.168.1.1


#/etc/init.d/networking restart
で設定更新!


いや〜楽チンです。
これで一つバッドノウハウが減った。
瀧内さん、感謝です♪ http://rails.office.drecom.jp/hibi/archive/27

This article was migrated from http://rails.office.drecom.jp/hibi/archive/27

posted by Png satoko on Thu 14 Sep 2006 at 11:26
Contents
配列を「,」で連結し文字列に 
User.find_or_create_by_id 
IPを固定にする 
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ