Open brianmcmichael opened 8 years ago
I get nervous about apps that have multiple workflows.
You might be able to setup the layout navbar to yield
variables passed from the corresponding views with content_for
. For example...
Apps / CoolSim / Geometries (+ Add Geometry) Apps / CoolSim / HeatAnalysis (+ Add HeatAnalysis)
and if there is nothing to yield
then default to nothing...
Apps / CoolSim
The developer can remove the links. Right now "Add simulations" is hardcoded and links to "#", so it isn't doing much good.
The scaffold already generates the route as part of it's magic, and we're just providing a link to that route. As it is, there's not a good way to navigate to new controllers after generating them.
Problem is if he edits the link and then adds a model it will overwrite his changes. Or if he adds a second model it will then overwrite those changes.
No, I see this as just an insert as part of the scaffold. 1 scaffold == 1 workflow, so running the scaffold would add a new link to the navbar. If there are multiple workflows there would be multiple links. You shouldn't be running a scaffold to create a model.
When I say model, I secretly mean workflow, hah. I am saying that we have multiple apps with multiple workflows. So we don't want to overwrite the user's html everytime they scaffold a new workflow.
Basically you put a comment or something into the application template and Thor's 'insert_into_file' method finds that comment and inserts the code, it doesn't change or overwrite anything that's already there.
I propose we add content_for
tags in the workflow scaffold views that manipulate the navbar as such:
Maybe remove the My Containers
as the Containers
in the breadcrumbs will navigate the user to the index page for containers.
This would work for multiple workflows (i.e., Containers
and Structures
) depending on the route the user goes to.
The Rails Application Template includes a link to "Add Simulation" which is empty.
This could be removed from the template and then added back in to
applicaton.html.erb
as a titlized link when the developer calls the scaffold by using Thor'sinsert_into_file
method.http://www.rubydoc.info/github/wycats/thor/Thor/Actions#insert_into_file-instance_method