Suggestions on how to support user-customizable views and forms?

I’ve searched the archives and googled and can’t find much on this. I
need to allow an app admin to be able to define the layout of various
views (and eventually various forms). The admin should be able to
specify a row and column number for each field they want presented

I’m thinking a view could look something like this:

<% = @layout.title %>

<% @layout.rows.each do |row| -%> <% row.columns do |col| -%> <% end -%> <% end -%>
<%= col.label %> <%= col.model.send(col.method) %>

The “col” object contains the field’s label, db model class name, and
model method (could be a column attribute or any model instance
method).
The “row” object, so far, is just an array of col objects.

I don’t have the db design for this yet either.

Thanks for any and all suggestions.

Jeff

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs