Sha256: 0b383314d3a477b76185561e91290e7e6cf80de56d9304bcb661c15fec282ebd

Contents?: true

Size: 1.42 KB

Versions: 10

Compression:

Stored size: 1.42 KB

Contents

module Kryptonite
  
  class KryptoniteNotification < ActionMailer::Base
	
  	self.prepend_view_path File.join(File.dirname(__FILE__), '..', 'views', 'kryptonite')
	
  	def generate_new_password from, kryptonite_user, host, pass
  		@name = kryptonite_user.name
  		@host = host
  		@login = kryptonite_user.login
  		@pass = pass
  		@from_text = kryptonite_config_website_name
  		
  		mail(:to => kryptonite_user.email, :from => from, :subject => t("new_password_subject", :website_name=>kryptonite_config_website_name))
  	end
  
  	def new_user_information from, kryptonite_user, host, pass
      @name = kryptonite_user.name
  		@host = host
  		@login = kryptonite_user.login
  		@pass = pass
  		@from_text = kryptonite_config_website_name
  		
  		mail(:to => kryptonite_user.email, :from => from, :subject => t("new_account_subject", :website_name=>kryptonite_config_website_name))
  	end
  	
  	def password_reset_instructions from, kryptonite_user, host
  	  ActionMailer::Base.default_url_options[:host] = host.gsub("http://", "")
      @name = kryptonite_user.name
      @host = host
      @login = kryptonite_user.login
      @reset_password_url = edit_kryptonite_password_reset_url + "/?token=#{kryptonite_user.perishable_token}"
      @from_text = kryptonite_config_website_name

      mail(:to => kryptonite_user.email, :from => from, :subject => t("password_reset_subject", :website_name=>kryptonite_config_website_name))
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kryptonite-0.1.0 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.10 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.9 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.8 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.7 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.6 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.5 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.4 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.3 app/mailers/kryptonite/kryptonite_notification.rb
kryptonite-0.0.2 app/mailers/kryptonite/kryptonite_notification.rb