similar to: how to run methods of an ActiveResource object?

Displaying 20 results from an estimated 80000 matches similar to: "how to run methods of an ActiveResource object?"

2007 Nov 27
1
Plugin - How to access object from instance method
Quick question: Given a basic plugin... how can I access an object that I instantiated in the acts_as method from an instance method? Probably some sort of accessor... but where? def self.included(base) base.extend ClassMethods end module ClassMethods def acts_as_test object = Object.new ## This object needs to be accessible from the Instance Methods end include
2006 Jun 28
0
ActiveResource (was: 1.1.3 available.)
2006/6/28, Paul Barry <mail@paulbarry.com>: > Where can I find info about the "CRUD/resource-based features" that will be > in 1.2.0? In blogs. Especially about Railsconf and DHH''s keynotes. In trunk : http://dev.rubyonrails.org/browser/trunk/activeresource In DHH slides : Transcription of some slides from DHH''s talk at RubyKaigi 2006 (I suppose it must
2007 Oct 01
1
form urls and activeresource object
I have an update form that looks like this: <% form_for @article do |f| %> <p> <b>Title</b><br /> <%= f.text_field :title %> </p> <p> <%= f.submit "Update" %> </p> and when I try to update it doesn''t work because it prints this in the html form: <form
2008 Feb 05
9
ActiveResource / Creating an API
Hi, I am currently looking at creating an api for a new RESTful app built using rails 2.0. The two solutions I have come across seems to be ActiveResource and ActionWebServices. Although there seems to be plenty of documentation for the older ActionWebServices (both online and in books), this does not seem to be the case for ActiveResource. Does anyone know of any decent articles / screencasts
2007 Mar 10
6
ActiveResources 0.1.0 Released
See the blog post at http://blog.lonestarsoftware.net/2007/03/09/active_resources-010-released/ Reading through the rails blogosphere last week, I read a post (which I can not find again) that suggested a completely different approach to AJAX use in rails apps. The idea was to create a Javascript proxy to the ActiveRecord models and allow AR operations to be called from the client. I see this
2008 Sep 28
4
ActiveResource and InvalidAuthenticityToken exception
Hi, I have a Rails 2.1.1 web app, and a Rails 2.1.1 app acting as a client by using ActiveResource. From the client, I can find, create, and update resources owned by the web app. However, I can not delete any. Calling the .destroy method in ActiveResource generates a 422 from the web app. Not sure why this would be the case, since I thought protect_from_forgery only protects HTML and JS
2007 Aug 22
1
ActiveResource find method and restful controllers.
Hi, What''s the best way to add support for the activeresource find method in the controllers in my rails app? As I understand it when you invoke something like: Person.find(:all, :params => {:name = ''toby''}) this generates a request of: GET /people.xml?name=toby Does this mean that in my index method in PeopleController in my rails app I have params[name] set to
2009 Apr 10
0
ActiveRecord belongs_to ActiveResource
class Thing < ActiveRecord::Base belongs_to :other_thing end class OtherThing < ActiveResource::Base self.site = ... end The association here works. I can access other_thing from thing with no problems until, as usual, testing. Specifically functionally test the things_controller. The things controller is simple scaffold, however, having the association to an active resource model
2008 Jun 26
0
ActiveResource - 404 when resources use the :as parameter
Hi, I have another question about ActiveResource. In a REST server I have resources defined with the :as parameter, like: map.resources :alerts, :as => ''alertas'' But when I try an ActiveResource client to access that, it tries to access ''/alerts.xml'', which returns a 404. I tried defining the resource on the client too, but it seems it doesn''t
2006 Sep 27
0
ActiveResource and query string parameters
I have an app that was built using the new RESTful methods and I''m trying to access its resources from another app using ActiveResource. (more about the app itself on my blog -- http://jystewart.net/process ) The app provides details of bus stops in Grand Rapids, Michigan, and the index method for the stops resource allows users to specify a point (using its longitude and
2008 Oct 09
0
How to consume a nested singular resource?
Hi, We have a RESTful server application which exposes the following routes using the following rules, but when trying to consume those resources from a client application the routes are not generated correctly. And we are not sure how to get around that. The routes.rb specifies the following resources: ActionController::Routing::Routes.draw do |map| map.resources :users do |user|
2008 Jan 24
0
ActiveResource or Ajax/XHR + REXML or similar for calling ashx webservice
Hi! I''m making an application to display logs that are returned from an external resource as XML. I''d like to use ActiveResource, but from what I understand it can''t be done out of the box, because the WS I''m calling doesn''t conform to the URI conventions. To log on to the service, I''ll have to call something like
2007 Jun 21
2
does activeresource only work with edge?
hey all, I''ve just installed the activeresource gem and it wasn''t working, so I did gem update rails and it worked. But now I have rails-1.2.3.6906 and I think this is edge right? Is there a way to work on regular rails 1.2.3 with activeresource? thanx in advance Pat --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2007 Jul 04
1
Edge Rails required for ActiveResource
Just wanted to make sure I''m not missing anything here... I''m trying to use ActiveResource and I was trying to avoid using Edge Rails. However, since ActiveResource depends on the edge version of activesupport, I appear to be stuck going edge... have flailed around for a while trying to get ActiveResource to work with 1.2.3 but it just ain''t happening. Am I right? Gotta
2007 Sep 22
4
ActiveResource, find(1) works but no find(:all)
Hi, I''m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error [1]. Fuser is declared here [2]. Do you know what''s happening? Thanks. [1] ActiveResource::ServerError: Failed with 500 Internal Server Error from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:124:in `handle_response'' from
2006 Sep 01
2
Include ActiveResource
Hello, I want to give ActiveResource a spin. I have all the code checked out from SVN in vendor/rails (yes, including ActiveResource). I''m trying to make sure it gets loaded. I did this in environment.rb: config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/activeresource/lib ) Unfortunately I still can''t use it. I have an ActiveResource derived model, Address: class
2006 Nov 18
1
ActiveResource sample code?
I''d like to play around a bit with ActiveResource for consuming a web service. Does anyone have sample code they would be willing to share? I''ve googled all around and have come up empty except for simple (non- working) examples given in the RailsConf keynote and some associated blog entries. Thanks! cr --~--~---------~--~----~------------~-------~--~----~ You received
2009 May 28
0
Re: ActiveResource as API test rig? Two jsons?
bump... On Wed, May 20, 2009 at 3:57 PM, Marc Byrd <dr.marc.byrd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hi, > > I''m using ActiveResource as an API test rig for an API we''re developing for > our PHP app - the goal being to validate that we''re following some > externally validated conventions for ReSTful API and that we can support at >
2007 Jan 05
0
ActiveResource cache using memcache-client
I''ve created this class that overrides methods for find,delete,destroy,reload, and save in activeresource. The code populates a local memcache daemon and uses that cache for future find requests. I''m posting it here to get whatever feedback people have. I''m most interested in the pro/con of inheritance over a mixin and how such a module might be tested. $ cat
2008 May 09
1
Test Unit can't change data
I have converted my engine from myISAM to InnoDB, the matter now in Test Unit, the table cant do any changes for CRUD. Any advice? But if I convert it back, the CRUD can run very smooth and data value in attributes changed. Reinhart http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you