Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8812965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:43:39+00:00 2026-06-14T03:43:39+00:00

I am using a gem that have this e-mail method: #Sends and email for

  • 0

I am using a gem that have this e-mail method:

  #Sends and email for indicating a reply in an already created conversation
  def reply_message_email(message,receiver)
    @message = message
    @receiver = receiver
    subject = message.subject.to_s
    subject = strip_tags(subject) unless subject.html_safe?
    mail(:to => receiver.send(Mailboxer.email_method,message), :subject => t('mailboxer.message_mailer.subject_reply', :subject => subject)) do |format|
      format.text {render __method__}
      format.html {render __method__}
    end
  end
end

And I have this in my locale:

da:
  mailboxer:
    message_mailer:
        subject_reply: You have got a new reply "#{subject}"

Instead of overwriting the email method. Is it not possible to do some ruby code in a YAML file? Now the subject of an e-mail is just You have got a new reply “#{subject}” as text and the ruby code is not active.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:43:40+00:00Added an answer on June 14, 2026 at 3:43 am

    Rails’ translation files don’t permit Ruby, but they do have an interpolation mechanism. Try:

    subject_reply: "You have got a new reply %{subject}"
    

    See http://guides.rubyonrails.org/i18n.html#passing-variables-to-translations for more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question came about because the cells gem specifies template directories using File.join('app','cells'). That
I have a Rakefile that includes this: Jeweler::Tasks.new do |gem| # ... gem.add_dependency('json') end
I have created a gem that provides an executable. Now I'd like the users
Note: Using Rails 3.1 and current delayed_job gem. I have a User model that
I'm using the Pony gem to send emails. Assuming that I have both options
I have a Gem that I need to install it from github using bundler
I'm using two gems that depend on the faraday gem. Unfortunately, the depend on
Whenever I try installing anything using gem, I get this error - murtaza@murtaza-dev:~$ sudo
I am using this gem to search for youtube videos and display with ajax
I have a new application starting that's using Rails 2.3.8 for stability concerns and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.