Visual Rails Workbench - using styles to highlight views and partials
If you are using the Visual Rails Workbench - the drag and drop design environment in the latest beta of Ruby In Steel 1.2 - you might wonder how to figure out exactly which bits of a composite HTML page are generated by Rails ERb-format views, partials and layouts.
We have quite a few tools to help you figure out what is what in the HTML Page Designer. For absolute clarity, switch to the Page Design (Code View) or use the Document Outline to navigate the component parts. In Code View the Layout, Views and Partials are colour-coded and they are shown as branches on the Document Outliner tree.
In the HTML Designer there is an additional simple styling trick you can use to outline views and partials. Here you can see that I have set a style to highlight a view in a blue dotted line.
Unfortunately, when I change the background colour of the page, that line is no longer as visible as I’d ideally like it to be...
No problem. I just load up the Project Properties and edit the styles for partials and views. I’ll give the Views a thick yellow border...
...which now highlights the Views clearly in the designer.
If you want to create default styles for all your projects, set these in Tools/Options/Projects and Solutions. You will need to reload a page to see the style changes.
Ruby In Steel 1.2 beta 3 is available for download HERE.
For documentation on its principal features, see the links HERE.