Por hacer

Facebook Twitter

Action Mailer Basics. 1 Introduction Action Mailer allows you to send emails from your application using mailer classes and views.

Action Mailer Basics

Mailers work very similarly to controllers. They inherit from ActionMailer::Base and live in app/mailers, and they have associated views that appear in app/views. Contact Us form in Rails 3. #206 Action Mailer in Rails 3. Rodrigo Alves Vieira: Criando um form de contato no Rails. Umas das funcionalidades mais comuns em sites por toda a internet são os formulários de contato, aqueles que ficam geralmente numa página do seu site dedicada a receber feedback dos usuários.

Rodrigo Alves Vieira: Criando um form de contato no Rails

Essa semana precisei pela primeira vez desenvolver um form desses em um projeto Rails e apanhei um pouco então aqui vai a maneira como eu consegui fazer: Primeiro criei o mailer, com ActionMailer: # coding: utf-8class ContactMailer < ActionMailer::Base attr_accessor :name, :email, :message default to: "nome@dominio.com", from: "contato@dominio.com" headers = {'Return-Path' => 'contato@dominio.com'} def send_email(user_info) @user_info = user_info mail( to: "nome@dominio.com", subject: "Formulário de Contato da Minha Aplicação", from: "Aplicação <contato@dominio.com>", return_path: "contato@dominio.com", date: Time.now, content_type: "text/html" ) endend.

Rails Form helpers. This guide is not intended to be a complete documentation of available form helpers and their arguments.

Rails Form helpers

Please visit the Rails API documentation for a complete reference. 1 Dealing with Basic Forms. #235 OmniAuth Part 1. #236 OmniAuth Part 2. Internet en el Mundo - 10 lenguajes más utilizados por los usuarios de Internet a nivel mundial. How to use i18n string interpolation - zargony.com. Since Rails 2.2 has been released last week, lots of people are beginning to translate their applications – or, at least, many people seem to prepare their applications for later translation by replacing strings in views with t() calls.

How to use i18n string interpolation - zargony.com

If you’re modifying your application to be i18n-ready, or if you’re creating a new multilingual application, here’s a useful guideline to remember: translate meanings, not words. Remember, that other languages are not just only different words – most often, sentences are build differently in other languages. #77 Destroy Without JavaScript. #273 Geocoder. #16 Virtual Attributes. #167 More on Virtual Attributes.