Free Burma!

Uncategorized No Comments »

Free Burma!

Go to Irrawaddy.org (published here in Chiang Mai) to learn in-depth about the appalling political and human-rights situation in Burma and the continuing struggle for freedom.

Free Burma! Petition Widget

Name: (required)

Email:

Web:

Country:

del.icio.us Tags:
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Scaffold HABTM

Ruby on Rails No Comments »

Simple many-to-many relationships in Rails can be defined with the has_and_belongs_to_many directive in the controller. However, this approach has limitations for scaffolding in that Rails does not support rendering the relevant selection controls for the “other side of many” out-of-the box . There are a few plugins that can handle this, namely the scaffolding extension and ActiveScaffold. The latter gives you much richer - albeit somewhat rough around the edges - date entry pages for simply replacing your scaffold :mymodel with active_scaffold :mymodel in your controllers. I did not come across any issues when switching back to the Rails scaffold with the plugin installed but your mileage may vary. There’s also a rather lengthy screencast on how to do all this by hand. Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in