ActionWebService : decimal is not a valid base type

Hi,

I have searched for an answer to this, and have found a ticket which
seems to address the error:

http://dev.rubyonrails.org/ticket/6676

I am, however, getting a ‘decimal is not a valid base type’ error when
trying to return an ActiveRecord model which has a decimal value.

Agile Web D. with Rails v2 does not list decimal as a supported
parameter type. Is decimal supported? If not, how should this be solved?

Thanks,
GiantCranes

On 2/2/07, Giant C. [email protected] wrote:

Agile Web D. with Rails v2 does not list decimal as a supported
parameter type. Is decimal supported? If not, how should this be solved?

Thanks,
GiantCranes

Decimal is not a valid base type - use float in your parameter
signature.


Zack C.
http://depixelate.com

On 2/2/07, Giant C. [email protected] wrote:

Is it possible to override the decimal type at this level? If not, where
should I do this?

It’s a bug. I ran into it in rc1 with postgresql and filed a ticket a
while ago. Been long enough I can’t remember how I worked around it.

Chris

Decimal is not a valid base type - use float in your parameter
signature.

Thanks. My return type is an array of ActiveRecord objects, and they
have a decimal type defined. My api_method is:

api_method :get_vehicles, :returns => [[Vehicle]]

Is it possible to override the decimal type at this level? If not, where
should I do this?

Thanks,
GiantCranes

It’s a bug. I ran into it in rc1 with postgresql and filed a ticket a
while ago. Been long enough I can’t remember how I worked around it.

Thanks, I notice that it was addressed in changeset 5670 and this hasn’t
made it into 1.2.1.

http://dev.rubyonrails.org/changeset/5670

I’m not sure what to do now. I could change my db schema to use floats
instead of decimal. I could also use edge rails. I’m relatively new to
rails, any suggestions?

The ticket http://dev.rubyonrails.org/ticket/6676 has been closed, but
changes have not been merged into rails 1.2 branch.

On 2/2/07, Giant C. [email protected] wrote:


Kent

http://www.datanoise.com

Hi, I am now facing the same problem, and I want to ask you, if you’ve
found a solution?

I use rails 1.2.3 and I am horribly new at ruby and rails, so it would
be great, if you could give me a hint :wink:

regards
Katya

On 2 Feb., 20:02, Giant C. [email protected]

Kent S. wrote:

The ticket http://dev.rubyonrails.org/ticket/6676 has been closed, but
changes have not been merged into rails 1.2 branch.

Ok, I am going to take a deep breath and jump over onto edge rails.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs