Sha256: 5b018881a5adb9f4369cec2ecd2d658e76c2c003f662dbf50183eef2019d898a

Contents?: true

Size: 1.29 KB

Versions: 13

Compression:

Stored size: 1.29 KB

Contents

module Casein
  
  class CaseinNotification < ActionMailer::Base
	
  	self.prepend_view_path File.join(File.dirname(__FILE__), '..', 'views', 'casein')
	
  	def generate_new_password from, casein_user, host, pass
  		@name = casein_user.name
  		@host = host
  		@login = casein_user.login
  		@pass = pass
  		@from_text = casein_config_website_name
  		
  		mail(:to => casein_user.email, :from => from, :subject => "[#{casein_config_website_name}] New password")
  	end
  
  	def new_user_information from, casein_user, host, pass
      @name = casein_user.name
  		@host = host
  		@login = casein_user.login
  		@pass = pass
  		@from_text = casein_config_website_name
  		
  		mail(:to => casein_user.email, :from => from, :subject => "[#{casein_config_website_name}] New user account")
  	end
  	
  	def password_reset_instructions from, casein_user, host
  	  ActionMailer::Base.default_url_options[:host] = host.gsub("http://", "")
      @name = casein_user.name
      @host = host
      @login = casein_user.login
      @reset_password_url = edit_casein_password_reset_url + "/?token=#{casein_user.perishable_token}"
      @from_text = casein_config_website_name

      mail(:to => casein_user.email, :from => from, :subject => "[#{casein_config_website_name}] Password reset instructions")
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
casein-4.0.0 app/mailers/casein/casein_notification.rb
casein-4.0.0.beta1 app/mailers/casein/casein_notification.rb
casein-3.1.11 app/mailers/casein/casein_notification.rb
casein-3.1.10 app/mailers/casein/casein_notification.rb
casein-3.1.9 app/mailers/casein/casein_notification.rb
casein-3.1.8 app/mailers/casein/casein_notification.rb
casein-3.1.7 app/mailers/casein/casein_notification.rb
casein-3.1.6 app/mailers/casein/casein_notification.rb
casein-3.1.5 app/mailers/casein/casein_notification.rb
casein-3.1.4 app/mailers/casein/casein_notification.rb
casein-3.1.3 app/mailers/casein/casein_notification.rb
casein-3.1.2 app/mailers/casein/casein_notification.rb
casein-3.1.1 app/mailers/casein/casein_notification.rb