Questions tagged [activeresource]

ActiveResource is the main class for mapping RESTful resources as models in a Rails application

Active Resource objects represent your RESTful resources as manipulatable Ruby objects. To map resources to Ruby objects, Active Resource only needs a class name that corresponds to the resource name (e.g., the class Person maps to the resources people, very similarly to Active Record) and a site value, which holds the URI of the resources.

355 questions
0
votes
1 answer

ActiveResource or Flexirest SimplyRets API

I am working on an application where one of its functions is to pull mls/rets real estate listing data from SimplyRets. I'm brand new to API integration and I have ran into some issues: Using ActiveResource I can't get the app to connect. (end up…
0
votes
1 answer

How can url encoding be managed with ActiveResource?

Is there a way to manage URL encoding with ActiveResource? Specifically I am looking for a way to pass an email address as a parameter. Currently my query fails as the @ symbol gets URL encoded to %40, causing the lookup on the remote app to…
Paul Groves
  • 3,983
  • 2
  • 23
  • 24
0
votes
0 answers

Request inside request

I have two systems, which are communicating with each other. Ideal state: SystemA makes POST to SystemB SystemB is processing create action SystemB needs update data in SystemA thus it makes PUT to SystemA SystemA updates relevant data SystemB…
Doktor
  • 23
  • 4
0
votes
0 answers

ActiveResource reporting connection refused but Apache Logs Indicate authorization granted

I'm using Redmine as a support ticketing system and have created a form in my Drupal implementation to create an issue in Redmine using ActiveResource.php. The code works in PHPStorm, and also in a ProcessMaker installation, so I know that it works…
0
votes
1 answer

Extending the shopify_api gem in rails to retrieve resources only available for Shopify Plus users

In the Shopify API documentation, the resource "User" is offered for those who pay for the Shopify Plus account. See below: https://help.shopify.com/api/reference/user#current Speaking to Shopify's support, because Shopify Plus user's are a…
Colin Brogan
  • 728
  • 10
  • 26
0
votes
1 answer

Using Ruby On Rails 2.3, is it possible to accept nested attributes in one form using ActiveResource?

I have a Profile -> Photo relationship on the "server" application. The client application would the ability to upload up to three photos to the server side. A side note: I am using Paperclip plugin on the serving app. I have done something like…
0
votes
1 answer

How to raise ActiveResource ResourceInvalid exception?

I want to raise an Active Resource exception manually from RSpec and I am trying to doing something like this- ActiveResource::ResourceInvalid.new(422, "Error Message") Though I am able to raise ActiveRecord exception but ActiveResource is not…
user4086616
0
votes
1 answer

How to maintain the many-to-many association between ActiveRecord model and ActiveResource model in rails?

I have a rails app A, hosts most of the data, and have another app B uses some info in a table called location of A, and the location is many-to-many with users in B, for the decoupling reason I did not want to share DB between A and B, so I just…
0
votes
1 answer

ActiveResource: how to handle namespaced routes?

I have two applications. One application with routes like: namespace :api do namespace :v1 do resources :things end end And another that I hope to connect to it via ActiveResource. What's the right way to connect to the first application's…
0
votes
1 answer

Ruby on Rails ActiveResource not saving resource model properly

ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux], Rails 4.2.5 I have two projects. from 1st project i am getting data into second project through api. User model in 1st project: class User < ActiveRecord::Base has_many :cars end Car model…
0
votes
1 answer

Nginx Still Asking For Password When Loading Images

I am having a problem, I have set a nginx auth for my rails backend site which I am connecting with my rails frontend site using activeresource using self.user and self.password, everything works fine but when its loading images the backend site…
0
votes
1 answer

ActiveResource::Base models seek table while testing

I have an Airport model which extends ApplicationRecord and ApplicationRecord extends ActiveResource::Base class ApplicationRecord < ActiveResource::Base end class Airport < ApplicationRecord end When i run tests, it gives me error…
Mehmet Davut
  • 667
  • 10
  • 30
0
votes
1 answer

Maximum value of ActiveResource timeout

This is a bad thing to do but this temporary fix I want to push to production wants me to increase the timeout of ActiveResource. I've set it to 120 seconds. How much further can it go ?
Garfield
  • 1,247
  • 4
  • 15
  • 33
0
votes
0 answers

ActiveResource with nested relation fails with routing error

I am newbie to the rails world and in my project we have following model on server side class Server < ActiveRecord::Base has_many :disks, :dependent => :destroy accepts_nested_attributes_for :disks, :reject_if =>…
Anupam K
  • 309
  • 1
  • 4
  • 17
0
votes
0 answers

ActiveResource can't validate confirmation of attribute

I have this resource: require 'active_resource' class User < ActiveResource::Base self.site = 'http://localhost:3000/api/v2' self.include_format_in_path = false schema do attribute :id, :integer attribute :name, …
Guilherme
  • 7,839
  • 9
  • 56
  • 99