All Your Mailer Views in One Place

One of the greatest things that Rails provides to developers is a sensible set of defaults for where stuff goes in the file hierarchy. The standard approach to app/models, app/mailers, app/views, config, etc., allows us to arrive at a Rails project and quickly understand where existing code is and where to place our new code.I’m therefore loathe to deviate from the defaults, but I do make one exception: email view templates. They live in the same part of the folder hierarchy as the web views tied to Controllers, e.g. the views for whatever_mailer are found in app/views/whatever_mailer, even though your application’s Mailers are in a different location to your Controllers.
All Your Mailer Views in One Place #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/all-your-mailer-views-in-one-place

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles