# Idea in development - Dynamic Records

**URL:** <https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409>\
**Category:** Rails\
**Created:** [June 28, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409 "2006-06-28T18:17:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [June 28, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409/1 "2006-06-28T18:17:18Z")

</div>

Hi All,

I’ve been working on a client project where by the client can manage the  
some fields/values available in a model.

Here’s a quick writeup:  
[http://stephenbartholomew.wordpress.com/2006/06/28/dynamic-records/](http://stephenbartholomew.wordpress.com/2006/06/28/dynamic-records/)

The idea is very much in development, but i thought i’d like to put it  
out for feedback. The writeup is also pretty rushed so please excuse :0)

Cheers!

Stephen

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [June 30, 2006, 5:48pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409/2 "2006-06-30T17:48:22Z")

</div>

This looks great. A more in depth example of useage might be nice.

Stephen B. wrote:

> Hi All,
> 
> I’ve been working on a client project where by the client can manage the  
> some fields/values available in a model.
> 
> Here’s a quick writeup:  
> [http://stephenbartholomew.wordpress.com/2006/06/28/dynamic-records/](http://stephenbartholomew.wordpress.com/2006/06/28/dynamic-records/)
> 
> The idea is very much in development, but i thought i’d like to put it  
> out for feedback. The writeup is also pretty rushed so please excuse :0)
> 
> Cheers!
> 
> Stephen

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [June 30, 2006, 6:00pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409/3 "2006-06-30T18:00:28Z")

</div>

Funnily enough, I’ve been working on something very similar in the  
past week. It’s a bit of a hack - it allows admins to type in a hash  
as a string, which is eval’d and stored as a serialized hash. Forms  
are dynamically generated from the hash and the users can play with  
the values there. Would be interested in seeing what solution you  
came up with.

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [June 30, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409/4 "2006-06-30T18:01:25Z")

</div>

Hi,  
That sounds really cool. I am very new to rails (and ruby), but was  
thinking it could be cool to allow endusers to generate migrations  
dynamically and then run them. So they add fields (x y z) translates to  
migration to add fields x y z. Your form template would automagically  
loop scaffold style through fields in a table and make the elements in  
the form. The problem I see with migrations is that self.down limits  
you to removing added fields in the order they were added, which is very  
limiting. Anyway, keep us posted!

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [June 30, 2006, 6:09pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409/5 "2006-06-30T18:09:43Z")

</div>

Wow, this looks very interesting. I’ve been thinking about something  
like this as I for see needing it for a project coming up for me.  
Keep us up to date 🙂

Regards,  
-carl

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [June 30, 2006, 9:36pm UTC](https://www.ruby-forum.com/t/idea-in-development-dynamic-records/96409/6 "2006-06-30T21:36:26Z")

</div>

> This looks great. A more in depth example of useage might be nice.  
> Thanks :0) I’m planning a more in depth description of it v.soon. Just  
> setting up a new blog at the moment so it’ll have a more permenant home.

Just wanted to see if it’s something others are interested in - looks  
like it is so i’ll keep working on it and keep you posted!

Cheers,

Steve
