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 8100521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:45:18+00:00 2026-06-05T22:45:18+00:00

In my model for tutoring sessions, I have code that triggers reminder texts at

  • 0

In my model for tutoring sessions, I have code that triggers reminder texts at different times. Everything worked fine, until I tried some refactoring, and now I am having issues.

def send_reminder_text(texts_batch)
    texts_batch.each do |text|
        page_number = Refugee.find(text.refugee_id)[:last_page]
        body_of_text = text[:begin_time].in_time_zone.strftime("Burma Reminder: upcoming session at %I:%M%p beginning on page #{page_number}. 
            Please email jek2141@columbia.edu to reschedule or cancel the session.") 
        text.begin_text(body_of_text)
    end
end

def self.deliver_pm_reminder_text
    texts_batch = TutoringSession.batch_for_pm_reminder_text
    send_reminder_text(texts_batch)
end

def self.deliver_just_before_reminder_text
    texts_batch = TutoringSession.batch_for_just_before_reminder_text
    send_reminder_text(texts_batch)
end

When I call the deliver_just_before_reminder_text function, I get the following error message:

irb(main):006:0> TutoringSession.send_reminder_text
NoMethodError: undefined method `send_reminder_text' for #<Class:0x00000003cfe5d8>
    from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/active_record   /base.rb:1088:in `method_missing'
from (irb):6
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

This is in spite of the fact that the send_reminder_text is clearly defined above.

  • 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-05T22:45:19+00:00Added an answer on June 5, 2026 at 10:45 pm

    Your method declaration specifies that the method is on objects of the TutoringSession class:

    def send_reminder_text(texts_batch)
    

    But you’re trying to call it as if it were a method on the class itself:

    irb(main):006:0> TutoringSession.send_reminder_text
    

    Try changing your definition to:

    def self.send_reminder_text(texts_batch)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Model Item belongs_to User . In my controller I have code like this: @items
My model has different entities that I'd like to calculate once like the employees
My model classes are mostly implemented with synthesized setter/getter methods and everything was fine.
Should model objects that go to the view be checked for null before going
.model small .stack 100 .data .code mov ah,00h mov al,0e3h mov dx,00h int 14h
Model: I have a model in which one Installation can contain multiple Computer Systems.
A model Country has a attribute code which is automatically converted to lowercase by
Model View Controller policy says that views can`t own data and delegate should be
Model Code: class Task(db.Model): complete = db.BooleanProperty(default=False) HTML Code: <input type=checkbox name=complete value=True />
My Model implements INotifyPropertyChanged , and I have a WPF window bound to it

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.