Skip to content

Commit

Permalink
allow for symbol for description
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Sonnek committed Oct 17, 2011
1 parent 7a54b0d commit 4654534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions lib/email_preview.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'mail'
require 'email_preview/engine' if defined?(Rails)
require 'active_support/secure_random'

module EmailPreview
class << self
Expand All @@ -11,10 +10,10 @@ class << self
attr_accessor :before_preview_hook

def register(description, options={}, &block)
key = self.registry.keys.length + 1 #ActiveSupport::SecureRandom.hex
key = self.registry.keys.length + 1
options[:key] = key
options[:category] ||= 'General'
options[:description] ||= description
options[:description] ||= description.to_s
options[:block] ||= block
self.registry[key] = options
end
Expand Down Expand Up @@ -52,7 +51,6 @@ def preview_with_transaction
end
mail
end
# alias_method_chain :preview, :transaction
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/email_preview/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module EmailPreview
VERSION = "1.2.0"
VERSION = "1.2.1"
end

0 comments on commit 4654534

Please sign in to comment.