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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:08:39+00:00 2026-05-23T17:08:39+00:00

Apologies for the very broadly title question. Basically this follows on from my earlier

  • 0

Apologies for the very broadly title question.

Basically this follows on from my earlier question about defs and how they are called on instantiated methods.

Basically the way I have it now:

I set up an active resource on client side and post it with .save
This then goes through my controller on server and stores an active record of the same class.

so MyResource–>save–>MyRecord

The MyRecord is stored with a status column containing a simple string.
Thing is MyRecord class has a def called

  def get_status
    puts status
  end #Amazing method, I know

In my mind If i wanted to execute the get_status on MyRecord, all I had to do was this.

(Please note this is client side)
@test = MyRecord.find(1)
@test.get_status

Sadly this is not the case as @test becomes an active resource and cant call a method it doesnt have.
(NOTE: My classes are not actually called MyRecord and MyResource, They are just title that for simplicity as I’d rather understand the solution than have someone solve it for me.)

Would anyone care to point me in the right direction to explain how I call the active record method from client side. Have I gone completely the wrong way about it and should it be processed in controller instead of model?


On a side note: Are there any alternatives to .save? My boss doesn’t like it for reasons I cannot understand. (NOTE: he’s a lead, I’m an intern therefore I don’t argue or ask questions that seem like a challenge)

  • 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-23T17:08:40+00:00Added an answer on May 23, 2026 at 5:08 pm

    Honestly, ActiveResource needs a little work… I had to implement this exact feature where I work and ended up rolling my own semi RPC lib using basic http to share code between client and server.

    Really though something like ruby-rpc or DRb would probably be a better option.

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

Sidebar

Related Questions

Apologies for the unweildy title, this is a very difficult question to put into
Apologies if this is a very basic question, but I am preparing to create
I have a very novice question, so apologies if the answer to this is
Apologies if this doesn't make any sense, I'm very new to Python! From testing
Apologies, as this may seem a very weird question. All of my experience in
I am very new to XSL and XPath. Apologies if this question shows some
Firstly apologies if this a very basic question, I'm just curious to know the
Apologies if this is a dumb question, i'm very new to working in 3D.
This may be a very obvious question - apologies if it is. I have
Apologies in advance if this is a silly question, am very much a beginner.

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.