You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to change SOAP ComplexType fields for ActiveRecord models and I'm always stuck with the model's DB columns including created_at and possibly other unwanted fields, like in this WSDL excerpt:
What I want to do is to define new fields and/or get rid of others. Obviously I tried
class MyModel < ActiveRecord::Base
map name: :string, other_field: :double
end
but it results in undefined method 'map' for #<Class:0x00000005bada60>. Of course, making MyModel extend from WashOut::Type works fine but I want to keep instances of MyModel ActiveRecord objects. Is there any way to deal with it other than writing another class (extending from WashOut::Type) which would serve as a container around MyModel? Am I missing a module which I can include into an ActiveRecord class?
The text was updated successfully, but these errors were encountered:
@jdsampayo as I said, creating a container-like class such as the one you proposed works fine. However I'd prefer to be able to configure an existing ActiveRecord model rather than duplicate code by having to define separate classes for all models.
I'm unable to change SOAP ComplexType fields for ActiveRecord models and I'm always stuck with the model's DB columns including
created_at
and possibly other unwanted fields, like in this WSDL excerpt:What I want to do is to define new fields and/or get rid of others. Obviously I tried
but it results in
undefined method 'map' for #<Class:0x00000005bada60>
. Of course, makingMyModel
extend fromWashOut::Type
works fine but I want to keep instances ofMyModel
ActiveRecord objects. Is there any way to deal with it other than writing another class (extending fromWashOut::Type
) which would serve as a container aroundMyModel
? Am I missing a module which I can include into an ActiveRecord class?The text was updated successfully, but these errors were encountered: