first, let me explain what I’m trying to do because I might be going
about this all wrong.
I want the user to be able to CRUD (create, read, update, destroy) table
definitions as well as their rows. So the user should be able to delete
existing tables, add a table with user-defined columns, change the
columns of an existing table, etc. After that, the user should be able
to CRUD rows for those tables.
If you’re wondering why I was to be able to do this, here’s my scenario
(skip this paragraph if you don’t care). The web page is a 2-column
layout with a tree-view on the left. the treeview lists each schema
(table) and their respective instances (rows). so in the treeview is
listed things like ‘volunteers’, ‘donors’, ‘events’, etc. I want the
user to be able to modify a volunteer definition (modify table columns)
as well as add volunteers to the list. Also, I want the user to be able
to add a new user-defined schema (table). When a schema node is
clicked, the content-pane is populated with the the modifiable schema
definition. When an instance is clicked, the page is populated with the
modifiable row information.
Ok, that’s some obvious day-to-day rails programming, so I’m sure i’m
missing something essential. My question is if I can programmatically
generate models/scaffolds per newly created tables (if so how), and if
not how I should go about this.
I have the same question. I think maybe we need to use a cgi to run
scaffold script…
On 5ÔÂ13ÈÕ, ÉÏÎç11ʱ48·Ö, Tyler R. [email protected]
Hi Tyler
Did you figure out how to do this ? I have the exact same requirement.
Thanks
p3rlhax
Tyler R. wrote:
first, let me explain what I’m trying to do because I might be going
about this all wrong.
I want the user to be able to CRUD (create, read, update, destroy) table
definitions as well as their rows. So the user should be able to delete
existing tables, add a table with user-defined columns, change the
columns of an existing table, etc. After that, the user should be able
to CRUD rows for those tables.
If you’re wondering why I was to be able to do this, here’s my scenario
(skip this paragraph if you don’t care). The web page is a 2-column
layout with a tree-view on the left. the treeview lists each schema
(table) and their respective instances (rows). so in the treeview is
listed things like ‘volunteers’, ‘donors’, ‘events’, etc. I want the
user to be able to modify a volunteer definition (modify table columns)
as well as add volunteers to the list. Also, I want the user to be able
to add a new user-defined schema (table). When a schema node is
clicked, the content-pane is populated with the the modifiable schema
definition. When an instance is clicked, the page is populated with the
modifiable row information.
Ok, that’s some obvious day-to-day rails programming, so I’m sure i’m
missing something essential. My question is if I can programmatically
generate models/scaffolds per newly created tables (if so how), and if
not how I should go about this.