Skip to content

Commit

Permalink
fix stupid nil bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Lynn committed Nov 15, 2010
1 parent 93191ce commit 4bb14c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions lib/cap_railsless_mailer.rb
Expand Up @@ -61,17 +61,14 @@ def notification_email(cap, config = {}, *args)
@time = Time.now.strftime("%I:%M %p").to_s
@inferred_command = "cap #{@config[:task_name]}"
@task_name = @config[:task_name] || "unknown"
@site_name = config[:site_name]
@sections = config[:sections]
@site_name = @config[:site_name]
@sections = @config[:sections]
@section_data = section_data_hash
@site_url = config[:site_url]
@application = config[:application]
@site_url = @config[:site_url]
@application = @config[:application]
@repo_end = repo_end

mail(:to => @config[:recipient_addresses], :subject => subject_line) do |format|
format.text
format.html
end
mail(:to => @config[:recipient_addresses], :subject => subject_line)
end

private
Expand Down
6 changes: 3 additions & 3 deletions views/cap_railsless_mailer/notification_email.text.erb
Expand Up @@ -5,13 +5,13 @@
===========================================================
Released: <%= @date %> at <%= @time %>
<%@sections.each { |section| %>
<% @sections.each do |section| %>
<% data = @section_data[section.to_sym] %>
<% if !data.empty? %>
<% if %w(extra_information release_data).include?(section) %>
<%= render :partial => 'section_custom.text.erb', :locals => {:section_title => section, :data => data} %>
<% else %>
<%= render :partial => 'section.text.erb', :locals => {:section_title => section, :data => data} %>
<% end %>
end
<%} %>
<% end %>
<% end unless @sections.nil? %>

0 comments on commit 4bb14c1

Please sign in to comment.