0

I have a rails application that interacts with third party application and this third party application saves and to their database. Hence I am using Activeresource module.

class User < ActiveResource::Base
self.site = "API URL"
end

In my view page, which is filling the information of a person, I have :contact_address attribute for address field.

But my third party application expects to send the params of a form in certain format like for an address it is secondary_address column that is there in their db.

So In my rails application I am mapping my rails params to their db schema columns. like secondary_address = params[:user][:address]

While submitting the form, it does make an api call to the third party application along with these params and saves it successfully.

But When I try to fetch a record from my rails application as User.first, I am getting the error as "Unknown attribute: secondary_address"

Any ideas/suggestions will be highly appreciated.!!

rubyist
  • 3,074
  • 8
  • 37
  • 69

0 Answers0