Skip to content

Instantly share code, notes, and snippets.

@austinkettner
Created November 11, 2013 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austinkettner/7407164 to your computer and use it in GitHub Desktop.
Save austinkettner/7407164 to your computer and use it in GitHub Desktop.
module Sparq::Mail::Formats
class Welcome
message = File.read("layout.slim")
end
class VerifyEmail
end
class NotifyUserBlocked
end
class ResetPassword
def self.reset_password(user_data, api_link)
raise Sparq::Errors::UserStructExpected.new(user_data) if not user_data.is_a?(Sparq::DataStructs::UserStruct)
message = %Q`#{user_data[:user_first_name]} has requested to reset his password. please processed to #{api_link} to confirm and complete the password reset`
end
end
@ShaharHD
Copy link

def self.welcome
File.read("layout.slim")
end

def self.reset_password(user_data, api_link)
raise Sparq::Errors::UserStructExpected.new(user_data) if not user_data.is_a?(Sparq::DataStructs::UserStruct)

message = self.welcome
message << %Q#{user_data[:user_first_name]} has requested to reset his password. please processed to #{api_link} to confirm and complete the password reset

end

@ShaharHD
Copy link

def self.reset_password(user_data, api_link)
SLIM::some_wierd_function(File.read("layout.slim"), {user_data: user_data, api_link: api_link}
end

@ShaharHD
Copy link

@@LAYOUT_SLIM = File.read("layout.slim")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment