Permalink
Browse files

Let dashboard slugs have spaces

Otherwise email sending fails
  • Loading branch information...
1 parent 7f69013 commit 7ae463c04a1040e873b1aa59e9327be580958361 @ryana ryana committed Oct 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dashboard.rb
View
2 lib/dashboard.rb
@@ -98,7 +98,7 @@ def self.send_report(slug)
html = haml.render(Object.new, :dashboard => dashboard, :time => timestamp, :graphs => graphs)
email = Graphiti.settings.reports.dup
email['subject'] = "Graphiti Report for #{dashboard['title']} #{timestamp}"
- email['to'] = email['to'].gsub(/SLUG/, slug)
+ email['to'] = email['to'].gsub(/SLUG/, slug.gsub(/\s/, '.'))
email['via'] = email['via'].to_sym
email['via_options'] = email['via_options'].symbolize_keys! if email['via_options']
email['html_body'] = html

0 comments on commit 7ae463c

Please sign in to comment.