Sha256: e6353af7a5e40b2d5903ee1eb39eff4a9bf92888a54cc38ac59a92751761f433

Contents?: true

Size: 1.45 KB

Versions: 18

Compression:

Stored size: 1.45 KB

Contents

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

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

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
caseadilla-0.0.19 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.18 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.17 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.16 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.15 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.14 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.13 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.12 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.11 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.10 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.9 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.8 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.7 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.6 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.5 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.4 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.3 app/mailers/caseadilla/caseadilla_notification.rb
caseadilla-0.0.2 app/mailers/caseadilla/caseadilla_notification.rb