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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:12:21+00:00 2026-05-24T09:12:21+00:00

I have Rails application (Redmine) and I have created next working code which close

  • 0

I have Rails application (Redmine) and I have created next working code which close the Issue:

require 'active_resource'

class Issue < ActiveResource::Base
  self.site = "https://user@secret@esupport.some.com"
end

issue = Issue.find(7415)
issue.status_id = 5
issue.save

Now I want to put this code into Rails plugin. But if I put the class difinition to the Rails-plugins I get next error message:

TypeError (superclass mismatch for class Issue):

I know the reason of the error – Rails application have a model Issue, but I don’t know how to fix it.

If I’ll change class difinition to

class **OtherIssue** < ActiveResource::Base
  self.site = "https://user@secret@esupport.some.com"
end

the ActiveResource doesn’t know how to link my class to Rails model.

  • 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-24T09:12:22+00:00Added an answer on May 24, 2026 at 9:12 am

    It’s easy to forget you are working with xml when using ActiveResource
    If you had

    class SomeOtherIssue < ActiveResource::Base
      self.site = "https://support.some.com"
      self.element_name = "site"
      self.user = "someone"
      self.password = "secret"
    end
    
    some_other_issue = SomeOtherIssue.find(7415)
    some_other_issue.status_id = 5
    some_other_issue.save
    

    Then you would be saving the data back on the website. If you wanted to save the data on the Issue model locally you would have to find the local Issue record and assign the some_other_issue values to it

    Update in response to comment

    Use self.element_name = some path on the remote site
    e.g.

    self.element_name = 'my_model' will navigate to

    https://support.some.com/some_model
    

    so when you call some_other_issue = SomeOtherIssue.find(7415)you will be navigating to the show action on the my_model controller and passing in 7415 as the id parameter. Because your remote site will be using a RESTfull route (I hope) you will get the xml response instead of the html response in the my_model/show action.

    in your case you should set self.element_name = "issue".
    Hope that’s clearer.

    http://api.rubyonrails.org/classes/ActiveResource/Base.html will give you examples of this

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

Sidebar

Related Questions

I have a rails application which is still showing the cachebusting numeric string at
I have a Rails application that in the erb code, I use a select
I have the Ruby on Rails-based application Redmine (based on the BitNami redmine package)
I have a Rails application with the backbone-rails gem. Which works out fine but
I have a Rails application with several models-views-controllers which have some similar characteristics, for
I have a rails application which is accessible on www.mydomain.com/rails/ Everything seems to be
I have a rails application in which a user creates a record called a
I have a rails application which is running well in local (OsX, WEBrick). I've
I have a rails application in which I implemented some feature. Now I want
I have a rails application in which pages has many comments. So the relationships

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.