G''day Vishal,
I had this same problem myself.
What you need to do is add the following code to your API class
allow_active_record_expects true
You''ll need to be REALLY careful though with methods that do inserts
or updates to make sure you don''t allow the RPC clients update things
they shouldn''t.
Daniel
On 21/12/2006, at 5:49 AM, vishala-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
wrote:
>
> I want to use active record as a expect in my api_method.However if i
> try to do that i get an error stating active records cant be used as
> expects.
>
> I know i can use structs,but that would a wrong way and duplication of
> code.
>
> Any help is appreciated.
>
> Thanks
> Vishal
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---