No commit activity in last 3 years
No release in over 3 years
InCurve provides some handy helper methods for your Rails app, letting you easily inline your CSS code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 1.5.4
 Project Readme

InCurve¶ ↑

InCurve provides a single, beautiful, handy helper method for your Rails app, letting you easily inline any CSS code present on your mail views. InCurve is just a small wrapper around the “premailer” gem.

Example¶ ↑

If you have this mail view:

<% incurve_css do %>
  <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css">
        body {
          background-color: #e6e6e6;
          background-position: top center;
          background-repeat: no-repeat repeat-y;
          margin: 0;
          padding: 0;
        }
      </style>
    </head>
    <body>
    </body>
  </html>
<% end %>

The mail you’ll send will be like this:

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  </head>
  <body style="background-color: #e6e6e6; background-position: top center; background-repeat: no-repeat repeat-y; margin: 0; padding: 0;">
  </body>
</html>

Sweet.

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010-2019 weLaika. See LICENSE for details.