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

  • Home
  • SEARCH
  • 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 1014545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:16:04+00:00 2026-05-16T10:16:04+00:00

I’m trying to create my first Rails plugin and am having some troubles leveraging

  • 0

I’m trying to create my first Rails plugin and am having some troubles leveraging ActionMailer in it. The plugin just collects user feedback and emails it off a given address so in terms of functionality it’s not too complicated…

All the functionality was working perfectly in my original application until I decided to pluginise this stuff. I’ve been following the railsguide on creating a plugin as much as possible and you can find my entire plugin’s source here:

http://github.com/gshankar/rocket_feedback

Though I’m pretty sure the problem is in one of these files:

1- The file that loads everything in: rocket_feedback/lib/rocket_feedback.rb

require 'rocket_feedback/routing'
require 'action_mailer'

%w{ models controllers }.each do |dir|
  path = File.join(File.dirname(__FILE__), 'app', dir)
  $LOAD_PATH << path
  ActiveSupport::Dependencies.load_paths << path
  ActiveSupport::Dependencies.load_once_paths.delete(path)
end

2- The controller which calls the deliver_feedback method rocket_feedback/lib/app/controllers/rocket_feedback_controller.rb

class RocketFeedbackController < ApplicationController

  #Email method for feedback
  def send_feedback
      subject = params["subject"]
      from = params["email"]
      feedback = params["feedback"]
      RocketFeedback::deliver_feedback(from, subject, feedback)
      respond_to do |format|
        format.js { render :text => ''}
      end
   end
end

3- The model (which inherits from ActionMailer)

class RocketFeedback < ActionMailer::Base

  default_url_options[:host] = HOST

  def feedback(from, subject, feedback)
    @subject = "Feedback: #{subject}"
    @subject_for_message = subject
    @recipients = 'yourname@yourdomain.com' 
    @from = from
    @sent_on = Time.now
    @sent_at = Time.now.strftime("%d/%m/%Y, %I:%M:%S %p").to_s
    @body["sent_at"] = @sent_at
    @body["from"] = from
    @body["feedback"] = feedback
    @body["subject"] = @subject_for_message
    @headers = {}
  end

end

The only clue I have is this error message when I try and send feedback via the plugin:

NoMethodError (undefined method `deliver_feedback' for RocketFeedback:Module):

Thanks in advance for you help! (And please feel free to critque my plugin’s structure, it’s my first attempt so I’m sure I’ve done all kinds of things wrong…)

  • 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-05-16T10:16:05+00:00Added an answer on May 16, 2026 at 10:16 am

    You have a RocketFeedback class and RocketFeedback module in your plugin. The ActionMailer#deliver_foo dynamic method is defined through your class. You should call class methods using the dot operator.

    # Instead of this
    RocketFeedback::deliver_feedback(from, subject, feedback)
    # This should work
    RocketFeedback.deliver_feedback(from, subject, feedback)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.