zunaira ihsan

Joined

100 Experience
0 Lessons Completed
0 Questions Solved

Activity

us = User.first
email = EmailDetail.find_by_name("Welcome User Email")
UserNotification.with(email_class: "UserMailer" , email: email.function_name).deliver(us)

i am trying to pass mailer name as a params and accessing this in my method
but keeps giving me error

undefined method `with' for "UserMailer":String

why i try to access it like this

class UserNotification < Noticed::Base
deliver_by :email, mailer: :mailer_name , method: :email_name
deliver_by :database

params :email

def mailer_name
"UserMailer"
end

def email_name
params[:email]
end

end

Posted in How i can add delivery method with slack?

I cant find any tutorial on how to use noticed gem with slack, can anyone please explain for are the steps for slack integration with his gem I'm new to rails and find it hard to integrate this with slack.