lib/awesome_email/helpers.rb
# prints the contents of a file to the page
# default file_name is 'html-mail.css'
prints the contents of a file to the page
default file_name is 'html-mail.css'
prints the contents of a file to the page default file_name is ' html - mail . css '
def render_css_file(file_name = 'html-mail.css')
        file_name = "#{file_name}.css" unless file_name.end_with?('.css')
        relative_path = File.join('public', 'stylesheets', 'mails', file_name)
        files = Dir.glob(File.join(RAILS_ROOT, '**', relative_path))
        full_path = files.blank? ? File.join(RAILS_ROOT, relative_path) : files.first
        File.read(full_path) rescue ''
      end
def render_css_file ( file_name = 'html-mail.css' ) file_name = "#{file_name}.css" unless file_name . end_with? ( '.css' ) relative_path = File . join ( 'public' , 'stylesheets' , 'mails' , file_name ) files = Dir . glob ( File . join ( RAILS_ROOT , '**' , relative_path ) ) full_path = files . blank? ? File . join ( RAILS_ROOT , relative_path ) : files . first File . read ( full_path ) rescue '' end
prints the contents of a file to the page
default file_name is 'html-mail.css'
prints the contents of a file to the page default file_name is ' html - mail . css '
file_name