Katipo
Search  
Site Blog
  About  
  Home
About Portfolio Solutions Client Area Contact Us
: : About Us
Awards
Jobs
Our People
What Is A ... ?
Working From Home
News
Photo Gallery
Katipo Blog


Archive for October, 2006

Rails: Using has_many :through associations, and the piggyback plugin to model dynamic forms

Tuesday, October 31st, 2006

Note: this relies on you using EdgeRails .

I’m writing an application that will allow administrators to create dynamic forms for topics. The “dynamic form” design boils down to many to many relationship between topic_type_fields and topic_types. After a lot of getting to know what is out there with modeling many to many relationships in Ruby on Rails I settled on the has_many :through route.

Both has_and_belongs_to_many and has_many :through weren’t completey up to the task, but has_many :through was clearly winning the “hearts and minds” war within the Rails community. It’s a more intuitive way of expressing the relationship and turns out to flexible enough to do what I need. With a little help from the piggy_back plugin and some guidance from hasmanythrough.com’s blog I was able to get what I wanted.

(more…)

Rails: Integrating the TinyMCE plugin into ajaxscaffold generated forms

Friday, October 27th, 2006

At the moment I’m using the ajaxscaffold generator for a couple of my controllers, one of which has a need for a rich text editor.

(more…)


Katipo
Rachel Snowboarding