as we all know that html_safe work in controller and view
i am sending some data from user_mailer.rb file and its having some special character like if i wrote &”samarth” so its show &amd"samarth"
the code is
def alert_publication_notification(user, cust_alert, home_url)
load_mailer_settings
@content_type = "text/html"
@subject = ("[abc]- #{cust_alert.alert.name.html_safe} : mail ") due to this line i am getting special character any solution
@from = "sam"
@recipients = user.login
@bcc = Settings.emailid_alerts
@sent_on = Time.now
@customer_alert = cust_alert
@user = user
@home_url = home_url
end
use
raw(some_variable)function for RAILS 3 this will not show encoded characters.