Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding basic files for initial mail merge flow.

  • Loading branch information...
commit 0f3960308121a6be2f38a1d3d85912fa8c8d9f98 1 parent 347c51f
@nahurst authored
View
3  app/assets/stylesheets/mail_merge.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the MailMerge controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
10 app/controllers/mail_merge_controller.rb
@@ -0,0 +1,10 @@
+class MailMergeController < ApplicationController
+ def show
+ end
+
+ def new
+ end
+
+ def create
+ end
+end
View
3  app/models/mail_merge.rb
@@ -0,0 +1,3 @@
+class MailMerge < ActiveRecord::Base
+ attr_accessible :body_template, :data, :subject_template
+end
View
2  app/views/mail_merge/new.html.erb
@@ -0,0 +1,2 @@
+<h1>MailMerge#new</h1>
+<p>Find me in app/views/mail_merge/new.html.erb</p>
View
2  app/views/mail_merge/show.html.erb
@@ -0,0 +1,2 @@
+<h1>MailMerge#show</h1>
+<p>Find me in app/views/mail_merge/show.html.erb</p>
View
2  config/routes.rb
@@ -1,2 +1,4 @@
HappyTo::Application.routes.draw do
+ root :to => "mail_merge#new"
+ resources :mail_merge
end
View
11 db/migrate/20130317223920_create_mail_merges.rb
@@ -0,0 +1,11 @@
+class CreateMailMerges < ActiveRecord::Migration
+ def change
+ create_table :mail_merges do |t|
+ t.text :data
+ t.string :subject_template
+ t.text :body_template
+
+ t.timestamps
+ end
+ end
+end
View
9 spec/factories/mail_merges.rb
@@ -0,0 +1,9 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :mail_merge do
+ data "MyText"
+ subject_template "MyString"
+ body_template "MyText"
+ end
+end
View
5 spec/models/mail_merge_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe MailMerge do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.