I’m now developing a flexible car database for a couple of hours per week. Our first customer, a Beemer dealer, has a lot of fancy requests. Well, the hired-in Flash developer has these requests actually.
One of them is that they want to save a field in the database that contains a unique identification number for the secondhand cars they sell. But this number is set-up in a way that is unique to BMW’s. So actually, I didn’t want to add this column to the database, ’cause that will mess up my clean database tables.
But then I came up with the idea to add functionality to the website where users (dealers in this case) can add custom columns to their cars / profiles.
Instead of creating this functionality from scratch, I first wanted to know if there are any plugins that have this functionality already. I found these three:
- acts_as_free_form
- has-magic-columns
- acts_as_customizable
I haven’t decided (yet) which is best.
And if you want to roll your own, here’s a nice article about choosing the best structure for dynamic fields.
I realize that the story above is written in truly horrible English. But I really didn’t have the energy to make something nice of it…
4 comments ↓
Thanks for the post. Which method did you end up choosing? How did it work out for you?
I forked has_magic_columns and and I’ve used it on the “auto” model.
Hi Leon,
Could you please explain the usage of has_magic_columns :for => and has_magic_columns :through => ?
Also how can i remove the magic columns?
Thanks,
Hi, how did you deal with the view? I mean, how to dynamic add the fields and reutilize them other time associating like a nested form.
I don’t know if I made myself clear.
Thanks
Leave a Comment