Skip to content

Commit

Permalink
Text email version. Fixed test environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
macoca committed Oct 20, 2011
1 parent 091562f commit 8c1b8a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
12 changes: 12 additions & 0 deletions app/helpers/mailer_helper.rb
@@ -1,5 +1,17 @@
module MailerHelper

def advertised_link name, url
(link url do
orange_button do
name
end
end) +
(tag :br) +
(small_orange_link url do
url
end)
end

def body
content_tag :div, :style => style_for(body_style) do
yield
Expand Down
10 changes: 1 addition & 9 deletions app/views/user_mailer/confirmation_instructions.html.erb
Expand Up @@ -5,12 +5,4 @@
To verify your account and complete the registration process please click in the link below or copy paste the URL into your browser
<% end %>
<br/>
<%= link confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) do %>
<%= orange_button do %>
Confirm my account
<% end %>
<% end %>
<br/>
<%= small_orange_link confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) do %>
<%= confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>
<% end %>
<%= advertised_link 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %>
10 changes: 1 addition & 9 deletions app/views/user_mailer/reset_password_instructions.html.erb
Expand Up @@ -5,15 +5,7 @@
Someone has requested a link to change your password, and you can do this through the link below.
<% end %>
<br/>
<%= link edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) do %>
<%= orange_button do %>
Change my password
<% end %>
<% end %>
<br/>
<%= small_orange_link edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) do %>
<%= edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>
<% end %>
<%= advertised_link 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %>
<br/>
<%= h2 do %>
If you didn't request this, please ignore this email. Your password won't change until you access the link above and create a new one.
Expand Down
2 changes: 2 additions & 0 deletions config/environments/test.rb
Expand Up @@ -25,6 +25,8 @@
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

config.action_mailer.default_url_options = { :host => 'test' }

# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
Expand Down

0 comments on commit 8c1b8a2

Please sign in to comment.