Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

5
rant: love Rails; hate Layouts. Am i alone?
Post Body

more specifically, i hate the way we use them at work. They're such a mess, but any protest from me falls on deaf ears because 'it's idiomatic'. Basically, some of the page content - typically static content like headers or footers will be in the Layout, some will be in the view template. the thing is where the division is is kinda arbitrary: H1 ? Lead para ? who knows. to facilitate reuse everything ends up being conditional, maybe with multiple versions; multiple headers, multiple footers. the 'content' template then has to configure the Layout.
(IMO it would just be more direct to call a helper method, or something, in the main template to include what you need.)
But then layouts proliferate when it's not obvious if you can configure the Layout to do what you want.
Worst of all, the content Template is then tightly coupled to the layout, so the whole thing is a bit pointless. view tests don't work, pages break unintentionally.
Any one else find this a crap way of doing it? or just me?

Author
Account Strength
90%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,224
Link Karma
81
Comment Karma
1,143
Profile updated: 4 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 months ago