How can I change my application layout for certain views?

Is there any way to change / restrict the application layout for certain views? For example, I don’t want to render the header for a certain view… When you’re in your view, Rails makes the current controller and action name available to you. So you could do something like this:

But, as I’ve said… Continue reading

If I have a deeply nested set of objects, will “delegate” help me make sense of them?

Imagine you have a Report that is built out of multiple templates and values, where a template is built out of sections, columns and fields:

This is a pretty complex, circular, set of relationships. And in fact, in situations like this, I would use an Entity Relationship Diagram, which is an old-fashioned way of… Continue reading

How do I simplify my views?

You may have heard people say that you shouldn’t use conditionals in your views. Maybe you’re wondering what that means. Maybe you’re wondering why? I just want to change what I show based upon some criteria The reason you should try to avoid conditionals in your views is that it makes them complicated. Conditionals anywhere… Continue reading