<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>func09</title>
	<atom:link href="http://www.func09.com/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.func09.com/wordpress</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 30 Aug 2010 05:32:03 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>[Rails3][Mongoid] スレッド式掲示板を作ってみた</title>
		<link>http://www.func09.com/wordpress/archives/980</link>
		<comments>http://www.func09.com/wordpress/archives/980#comments</comments>
		<pubDate>Mon, 16 Aug 2010 02:22:38 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongoid]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails3]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=980</guid>
		<description><![CDATA[Rails3で簡単なサンプルを作ってみた
スレッド式掲示板です。





レスは追加できるけど、スレッド追加する機能は作り忘れた。

Mongoid版

http://github.com/func09/rails3_ [...]]]></description>
			<content:encoded><![CDATA[<p>Rails3で簡単なサンプルを作ってみた
スレッド式掲示板です。</p>

<p><img class="alignnone size-medium wp-image-984" title="Bbs" src="http://www.func09.com/wordpress/wp-content/uploads/Bbs-300x282.jpg" alt="" width="300" height="282" /></p>

<p><img class="alignnone size-medium wp-image-983" title="Bbs-1" src="http://www.func09.com/wordpress/wp-content/uploads/Bbs-1-300x280.jpg" alt="" width="300" height="280" /></p>

<p>レスは追加できるけど、スレッド追加する機能は作り忘れた。</p>

<p><strong>Mongoid版</strong></p>

<p><a href="http://github.com/func09/rails3_sample_bbs/tree/mongoid-20100813">http://github.com/func09/rails3_sample_bbs/tree/mongoid-20100813</a></p>

<p><strong>ActiveRecord版</strong></p>

<p><a href="http://github.com/func09/rails3_sample_bbs/tree/activerecord-20100813">http://github.com/func09/rails3_sample_bbs/tree/activerecord-20100813</a></p>

<p>それぞれのREADMEに従えば動くはず。
rake db:seed でサンプルデータがインサートされるます。</p>

<p>Rails3だからといって、別段特殊なコードは書けなかった。
よくもわるくもいつもどおり書けた。</p>

<p><a href="http://github.com/func09/rails3_sample_bbs/zipball/mongoid-20100813">http://github.com/func09/rails3_sample_bbs/zipball/mongoid-20100813</a></p>

<p><a href="http://github.com/func09/rails3_sample_bbs/zipball/activerecord-20100813">http://github.com/func09/rails3_sample_bbs/zipball/activerecord-20100813</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/980/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails3のリリース前にチェックすべきこと</title>
		<link>http://www.func09.com/wordpress/archives/970</link>
		<comments>http://www.func09.com/wordpress/archives/970#comments</comments>
		<pubDate>Tue, 10 Aug 2010 08:14:58 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails3]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=970</guid>
		<description><![CDATA[みんな大好きRuby on Railsも、RCが出て、いよいよバージョン３登場間際といった感じですね 2010年8月30日にリリースされました。

ベータ版をいれるのはちょっと・・と尻込みしていた人（僕）も、やっと重い尻 [...]]]></description>
			<content:encoded><![CDATA[<p>みんな大好きRuby on Railsも、<a href="http://weblog.rubyonrails.org/2010/7/26/rails-3-0-release-candidate">RC</a>が出て、<del datetime="2010-08-30T05:28:37+00:00">いよいよバージョン３登場間際といった感じですね</del> 2010年8月30日にリリースされました。</p>

<p>ベータ版をいれるのはちょっと・・と尻込みしていた人（僕）も、やっと重い尻を上げてみようじゃないかと思わなくもないのではないでしょうか？</p>

<p>そこで、Rails3のリリース前にチェックすべき事などをメモします。</p>

<h2>RVMをインストールして、Rails2とRails3の環境を共存させる</h2>

<p>Rails3から、railsコマンドの挙動が大きく変わっているので、これまでのRails2も使う必要がある場合は、RVMで複数のRuby環境を準備しておくのが良いです。</p>

<p>Ruby Freaks Lounge 第39回　RVM（Ruby Version Manager）による環境構築<br />
<a href="http://gihyo.jp/dev/serial/01/ruby/0039">http://gihyo.jp/dev/serial/01/ruby/0039</a><br /></p>

<p>Ruby Freaks Lounge 第40回　RVM（Ruby Version Manager）による環境構築（2）<br />
<a href="http://gihyo.jp/dev/serial/01/ruby/0040">http://gihyo.jp/dev/serial/01/ruby/0040</a></p>

<p>※追記を参照のこと</p>

<h2>Rails2 と Rails3 の違いを、ざっくりっと学ぶ</h2>

<p>いままで慣れ親しんだRails2のインターフェイスは、結構互換性があるので、移行に関してものすごく大きなインパクトがあるわけではないようです。</p>

<p>Rails2との違いを比較しながら、Rails3の新しい部分を紹介した素晴らしいスクリーンキャストがあります。
各コンポーネントごとに動画が用意されていて、資料のPDF（全８６ページ）もとてもわかりやすく、一度Rails2を学んだ人であれば、ひととおり流せばRails3の新機能を把握できると思います。</p>

<p>Dive into Rails3<br />
<a href="http://rubyonrails.org/screencasts/rails3">http://rubyonrails.org/screencasts/rails3</a><br /></p>

<p>上記のプレゼン資料（PDF）<br />
<a href="http://assets.en.oreilly.com/1/event/40/The%20Rails%203%20Ropes%20Course%20Presentation.pdf">http://assets.en.oreilly.com/1/event/40/The%20Rails%203%20Ropes%20Course%20Presentation.pdf</a></p>

<p>時間がないひとはPDFを見るだけで十分ですよ。</p>

<h2>Rails2のプロジェクトをRails3にアップデートする</h2>

<p>既存のRails2プロジェクトをRails3にアップデートする方法は、RailsCastsで紹介されています。</p>

<p>Upgrading to Rails 3 Part 1<br />
<a href="http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1">http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1</a></p>

<p>Upgrading to Rails 3 Part 2<br />
<a href="http://railscasts.com/episodes/226-upgrading-to-rails-3-part-2">http://railscasts.com/episodes/226-upgrading-to-rails-3-part-2</a></p>

<p>Enjoy Rails3!</p>

<h2>追記：2010-08-30</h2>

<p>RVMはGemによるインストールが非推奨なので、こちらの方法に従うのがよいとのことです（by <a href="http://twitter.com/babie/status/22489257187">@babie</a>）。</p>

<p><a href="http://rvm.beginrescueend.com/rvm/install/">http://rvm.beginrescueend.com/rvm/install/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/970/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[rails]PaperClipでクロッピング</title>
		<link>http://www.func09.com/wordpress/archives/968</link>
		<comments>http://www.func09.com/wordpress/archives/968#comments</comments>
		<pubDate>Fri, 06 Aug 2010 09:58:57 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[paperclip]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=968</guid>
		<description><![CDATA[PaperClipでクロッピングしたい場合の書き方メモ

has_attached_file :picture, :styles =&#62; { :thumb =&#62; "200x200#" }

サイズ指定の後ろに「 [...]]]></description>
			<content:encoded><![CDATA[<p>PaperClipでクロッピングしたい場合の書き方メモ</p>

<pre class="brush:ruby">has_attached_file :picture, :styles =&gt; { :thumb =&gt; "200x200#" }</pre>

<p>サイズ指定の後ろに「#」で切り抜きになるようだ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/968/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[告知]嫁の作ったアニメがフジテレビのベビスマで放映されます</title>
		<link>http://www.func09.com/wordpress/archives/959</link>
		<comments>http://www.func09.com/wordpress/archives/959#comments</comments>
		<pubDate>Fri, 06 Aug 2010 08:09:48 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[うちの嫁]]></category>
		<category><![CDATA[嫁]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=959</guid>
		<description><![CDATA[

今週末に放映される、フジテレビのベビスマに
うちの嫁さんのアニメと、その制作風景が放映されます。

９日（日曜日）の深夜00:25〜です。

ベビスマ &#8211; フジテレビ
http://www.fujitv. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.func09.com/wordpress/wp-content/uploads/smap_bridge-300x168.jpg" alt="" title="smap_bridge" width="300" height="168" class="alignnone size-medium wp-image-960" /></p>

<p>今週末に放映される、フジテレビのベビスマに
うちの嫁さんのアニメと、その制作風景が放映されます。</p>

<p>９日（日曜日）の深夜00:25〜です。</p>

<p>ベビスマ &#8211; フジテレビ<br />
<a href="http://www.fujitv.co.jp/b_hp/baby-sma/index.html#bangumi">http://www.fujitv.co.jp/b_hp/baby-sma/index.html#bangumi</a></p>

<p>是非ごらんくださいませ。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/959/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Heroku]タイムゾーンを設定する</title>
		<link>http://www.func09.com/wordpress/archives/951</link>
		<comments>http://www.func09.com/wordpress/archives/951#comments</comments>
		<pubDate>Wed, 28 Jul 2010 04:39:18 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=951</guid>
		<description><![CDATA[Rails使いの味方Herokuネタです。

HerokuでRailsアプリをデプロイする場合、タイムゾーン設定にちょっと癖があります。



タイムゾーンを設定しても有効にならない

例えばページにアクセスすると「20 [...]]]></description>
			<content:encoded><![CDATA[<p>Rails使いの味方<a href="http://heroku.com/">Heroku</a>ネタです。</p>

<p>HerokuでRailsアプリをデプロイする場合、タイムゾーン設定にちょっと癖があります。</p>

<p><span id="more-951"></span></p>

<h3>タイムゾーンを設定しても有効にならない</h3>

<p>例えばページにアクセスすると「<strong>2010-07-28 13:28</strong>」と現在時刻を表示したいとしましょう。
時間によってメッセージを変えたりしたらとってもフレンドリーですよね。</p>

<p>そこで普段からenvironment.rbの編集はお手の物のRails紳士はこうするよね？</p>

<pre class="brush:ruby"># config/environment.rb
config.time_zone = 'Tokyo'</pre>

<p>さて、そろそろお昼だ。Heroku上で現在時刻のテストでもしてみよう。</p>

<pre class="brush:ruby"># % heroku console
&gt;&gt; Time.now.strftime("%Y-%m-%d %H:%M")
=&gt; "2010-07-27 20:28"</pre>

<p>なん・・だと・・？</p>

<p>そうです、Herokuではconfig/environment.rbのデフォルトタイムゾーンを無視しているようです。ちゃんとした理由はしりませんので、誰か教えてください。</p>

<h3>解決策</h3>

<p>解決策はこうです。</p>

<p>herokuコマンドのconfig:addを使って環境変数TZを東京（+09:00）に変更してやります。</p>

<div id="_mcePaste">
<pre class="brush:shell">% heroku config:add TZ=Asia/Tokyo
Adding config vars:
TZ =&gt; Asia/Tokyo
Restarting app...done.</pre>
</div>

<div id="_mcePaste">さて、気を取り直してもう一度。。</div>

<div>早くしないと休み時間おわっちゃうー</div>

<div>
<pre class="brush:shell">&gt;&gt; Time.now.strftime("%Y-%m-%d %H:%M")
=&gt; "2010-07-28 12:36"</pre>
</div>

<p>ちゃんと、日本時間で出力されました。良かったですね。</p>

<h3>追記</h3>

<p><a href="http://twitter.com/milk1000cc">@milk1000cc</a> さんに教えていただきました。</p>

<p>Rails2.1から使えるTime.zone.now、Time.zone.atを使えば、環境変数を設定しなくともタイムゾーンを考慮した時刻が取れるそうです。</p>

<blockquote>@func09 Time.zone.now, Time.zone.at みたいに Time.zone.(メソッド) って書けば time_zone 考慮してくれますよ。僕も前悩みました。</blockquote>

<p><a href="http://">http://twitter.com/milk1000cc/status/19715676833</a>
<a href="http://twitter.com/milk1000cc/status/19715779235">http://twitter.com/milk1000cc/status/19715779235</a></p>

<p><a href="http://twitter.com/milk1000cc">@milk1000cc</a>++</p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/951/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>はてブの一番上になった</title>
		<link>http://www.func09.com/wordpress/archives/947</link>
		<comments>http://www.func09.com/wordpress/archives/947#comments</comments>
		<pubDate>Sat, 24 Jul 2010 14:50:04 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[日記]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=947</guid>
		<description><![CDATA[

１時間でツイッターサービスを作ろう！
http://kray.jp/blog/twitter_service_in_1hours/

会社のブログに書いたエントリーがホッテントリに。しかも人生初の一番上のポジション。 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-948" title="Skitch" src="http://www.func09.com/wordpress/wp-content/uploads/Skitch-300x210.jpg" alt="" width="300" height="210" /></p>

<p>１時間でツイッターサービスを作ろう！
<a href="http://kray.jp/blog/twitter_service_in_1hours/">http://kray.jp/blog/twitter_service_in_1hours/</a></p>

<p>会社のブログに書いたエントリーがホッテントリに。しかも人生初の一番上のポジション。びっくり。</p>

<p>記念に。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/947/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ラペコにコメント投稿機能を追加しました</title>
		<link>http://www.func09.com/wordpress/archives/943</link>
		<comments>http://www.func09.com/wordpress/archives/943#comments</comments>
		<pubDate>Tue, 20 Jul 2010 01:00:41 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[works]]></category>
		<category><![CDATA[ラペコ]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=943</guid>
		<description><![CDATA[ラペコにコメント機能を追加しました！



コメントはログインしていれば、各ペコフォトに対して投稿することができます。
ラペコ内だけのコメントとして投稿することもできますが、同時にツイッターに つぶやくことも可能です。
 [...]]]></description>
			<content:encoded><![CDATA[<p>ラペコにコメント機能を追加しました！</p>

<p><img class="alignnone size-full wp-image-944" title="スイカ - ラペコ 美味しそう！を共有するサービス" src="http://www.func09.com/wordpress/wp-content/uploads/eb8dc3abd3f445d2d0d20d25ab1b6f6e.jpg" alt="" width="560" height="465" /></p>

<p>コメントはログインしていれば、各ペコフォトに対して投稿することができます。
ラペコ内だけのコメントとして投稿することもできますが、同時にツイッターに つぶやくことも可能です。</p>

<p>是非ご利用ください。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/943/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ツイッターに匿名で投稿できるサービスを作りました</title>
		<link>http://www.func09.com/wordpress/archives/939</link>
		<comments>http://www.func09.com/wordpress/archives/939#comments</comments>
		<pubDate>Fri, 09 Jul 2010 05:49:33 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[Webサービス]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=939</guid>
		<description><![CDATA[ツイッターに匿名で投稿できるサービスを作りました。



つぶやき＠名無しさん
http://nanasi3.com/



どんなサービス？


    ツイッターに匿名でつぶやけます
    ツイッターアカウントがな [...]]]></description>
			<content:encoded><![CDATA[<p>ツイッターに匿名で投稿できるサービスを作りました。</p>

<p><a href="http://nanasi3.com"><img class="alignnone size-full wp-image-941" title="つぶやき＠名無し - ホーム" src="http://www.func09.com/wordpress/wp-content/uploads/15538fc1297a0e0180927eabe0b5dda0.jpg" alt="" width="560" height="483" /></a></p>

<p>つぶやき＠名無しさん
<a href="http://nanasi3.com/">http://nanasi3.com/</a></p>

<p><span id="more-939"></span></p>

<h3>どんなサービス？</h3>

<ul>
    <li>ツイッターに匿名でつぶやけます</li>
    <li>ツイッターアカウントがなくても可</li>
    <li>ツイッターアカウントがあると便利になる</li>
</ul>

<h3>匿名でつぶやけると・・</h3>

<ul>
    <li>自分のアカウントでは言いづらい、でも誰かに言いたい！そんなつぶやきの行き場所になります。</li>
    <li>匿名でリプライできる</li>
</ul>

<h3>Heroku</h3>

<p>サーバに<a href="http://heroku.com/">Heroku</a>の無料プランを使ってます。</p>

<p>ブロッサム！ブロッサム！</p>

<h3>ソースコード</h3>

<p>ソースコードはGithubに置いてあります。</p>

<p><a href="http://github.com/func09/nanasi3">http://github.com/func09/nanasi3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/939/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>写真を美味しく変換するiPhoneアプリ『DeliCam』がラペコ投稿に対応</title>
		<link>http://www.func09.com/wordpress/archives/930</link>
		<comments>http://www.func09.com/wordpress/archives/930#comments</comments>
		<pubDate>Mon, 05 Jul 2010 01:00:19 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[ラペコ]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=930</guid>
		<description><![CDATA[写真を美味しく変換するiPhoneアプリ『DeliCam』と美味しい写真を共有するラペコがコラボレーションしました。]]></description>
			<content:encoded><![CDATA[<p><a href="http://rapeco.jp/campaign_delicam"><img class="alignnone size-full wp-image-931" title="Campaign_delicam" src="http://www.func09.com/wordpress/wp-content/uploads/Campaign_delicam.png" alt="" width="320" height="120" /></a></p>

<p><strong>写真を美味しそうに変換するDeliCamがラペコに対応</strong></p>

<div id="_mcePaste">味しそう！を共有するサービス「ラペコ」と、 写真を美味しそうに変換するiPhoneアプリ「<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315099381&amp;mt=8">Delicam</a>」が最強のコンビを組みました。</div>

<div></div>

<div id="_mcePaste"><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315099381&amp;mt=8">Delicam</a>は、撮影した写真を美味しそうに変換するiPhoneアプリです。</div>

<div id="_mcePaste">この度、<a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315099381&amp;mt=8">Delicam</a>の最新バージョンで、変換した美味しそうな写真をラペコに投稿することが可能になりました！</div>

<p><strong>今だけ半額キャンペーン中</strong></p>

<p><strong>「ラペコxDelicam 美味しさ共有キャンペーン」</strong>としまして、 通常<strong><span style="color: #ff0000;">230</span></strong>円のDelicamを、半額の<strong><span style="color: #ff0000;">115</span></strong>円で販売する半額キャンペーンを実施しています。 キャンペーン期間は<span style="color: #ff0000;"><strong>7/18</strong></span>までですので、是非この機会にDelicamを体験してください！</p>

<p><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=315099381&amp;mt=8"><img class="alignnone size-full wp-image-932" title="App-store" src="http://www.func09.com/wordpress/wp-content/uploads/App-store.png" alt="" width="120" height="39" /></a></p>

<h3>DeliCamでラペコへの投稿をもっと簡単に！</h3>

<p>Delicamで写真を撮影して、美味しそうに変換し、つぶやきと一緒にラペコに投稿する。
DeliCamを使えば、簡単に、より美味しそうなペコフォトを投稿できます！</p>

<p><img class="alignnone size-full wp-image-933" title="Delicam_campaign_screen_1" src="http://www.func09.com/wordpress/wp-content/uploads/Delicam_campaign_screen_1.png" alt="" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/930/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[rails] nifty_layoutがHamlに対応してた</title>
		<link>http://www.func09.com/wordpress/archives/922</link>
		<comments>http://www.func09.com/wordpress/archives/922#comments</comments>
		<pubDate>Tue, 29 Jun 2010 03:48:44 +0000</pubDate>
		<dc:creator>haga</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.func09.com/wordpress/?p=922</guid>
		<description><![CDATA[NiftyGeneratorとは？

すごくニッチな話題になってしまいますが
Railsでサクっとモックを作る時、僕はnifty_generatorを使います

http://github.com/ryanb/nifty [...]]]></description>
			<content:encoded><![CDATA[<h2>NiftyGeneratorとは？</h2>

<p>すごくニッチな話題になってしまいますが
Railsでサクっとモックを作る時、僕はnifty_generatorを使います</p>

<p><a href="http://github.com/ryanb/nifty-generators">http://github.com/ryanb/nifty-generators</a></p>

<p>nifty_generatorは<a href="http://railscasts.com/">RailsCasts</a>のryanb作の、サクっと便利でシンプルなコードを生成してくれるパッケージで</p>

<ul>
    <li>レイアウト</li>
    <li>Scaffold</li>
    <li>設定ファイル</li>
    <li>認証処理</li>
</ul>

<p>を生成するコマンドを提供してくれます。</p>

<p>RailsCasts内のサンプルアプリケーションは、いつもnifty_generatorを使ってますね。</p>

<p>標準のGeneratorスクリプトに比べて良い点は</p>

<ul>
    <li>デザインがシンプルだけど適度に良く、拡張する土台にしやすい</li>
    <li>レイアウトが良くできている</li>
    <li>レイアウトだけ生成できる</li>
</ul>

<p>という具合です。</p>

<p>特にScaffoldしなくてもレイアウトを生成してくれるのは、非常に便利なので僕は常用しているのですが、</p>

<p>最近ViewをHamlで書くようになってから、ちょっと不便だなぁと感じていました。</p>

<h2>Haml対応してた</h2>

<p>ヘルプみたら、普通に対応してるし・・。</p>

<pre class="brush:shell">script/generate nifty_layout --haml
create app/views/layouts
create public/stylesheets
exists app/helpers
create public/stylesheets/sass
create app/views/layouts/application.html.haml
create public/stylesheets/sass/application.sass
create app/helpers/layout_helper.rb</pre>

<p>すごい！かわいい！nifty_layout！</p>

<p>そして僕はどんどんコードをエディタで書かなくなるんだ！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.func09.com/wordpress/archives/922/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
