Hey Guys… need some advice on the best way to set things up. I’ll
explain my scenario below:
I have a rails app that does some processing through an xmlrpc API
connection with a third party application where I store the information.
I created a plugin that loads the API classes I created which contain
all the available methods through the API. It all works great, but my
question arises from how to go about certain things when using this
setup. For example, I have a basic form on the website where all the
processing goes through the api. Right now, I have that processing code
in my controller because I have no model. But the problem occurs when I
want to do things (like validation) that are only available when I only
have an ActiveRecord model. I guess my questions are:
Is it possible to create a model that extends ActiveRecord::Base and
overrides the save method to go through the API connection instead of
going to the local database?
If that is possible, is that still the best way to do it?
If not, what would be the best way going about this?