I am new to rails, and working on an internal content management app. I have made a prototype, but feel that it is messy and there is a better way. I require the following:
My current prototype uses the workflow (http://github.com/geekq/workflow) plugin to manage the state of both the project and topics. I have also looked into acts_as_tree and acts_as_list, but am unsure how best to structure things.
========
Project (has title, description, deadline, workflow_state) [states: unpublished(like draft], published (topics can be checked in and out, etc), archived (completed state)]
Module (is a child of project [acting as a group]; can be many; has title, description, content)
Section (is a child of module [acting as a group]; can be many;optional; has title, description, content)
Topic (is child of section; can be many; can be ordered; has title, description, content, workflow_state, owner_id, order) [states: new, checked_out, pending_review, review_required, completed]
Process (is child of topic; can be many; optional; has title, description, content)
Resource (is child of process; can be many; optional; file; has title, resource_link)
--
(There are also 2 more objects that are related to a project; introduction and fundamentals. There will only be one of each per project)
Introduction (is a child of project; only one; has :title, description, content, workflow_state) [states: same a topic]
Fundamentals (is a child of project; only one; has :title, description, content, workflow_state) [states: same a topic]
NB. I am aware that a few of these words are reserved and will need to be aliased.
========
I am hoping to use the URL structure similar to:
/projects/:project_id/modules/:module_id/sections/:section_id/topics/:topic_id/processes/:process_id/resources/:resource_id
or (if section is omitted)
/projects/:project_id/modules/:module_id/topics/:topic_id/processes/:process_id/resources/:resource_id
========
Any responses are greatly appreciated.
UPDATE: Rails 2.3.8