Forum: Ruby on Rails ActionWebService : decimal is not a valid base type

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Giant C. (Guest)
on 2007-02-02 19:06
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
Zack C. (Guest)
on 2007-02-02 19:15
(Received via mailing list)
On 2/2/07, Giant C. <removed_email_address@domain.invalid> 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
Giant C. (Guest)
on 2007-02-02 19:23
> 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
snacktime (Guest)
on 2007-02-02 19:29
(Received via mailing list)
On 2/2/07, Giant C. <removed_email_address@domain.invalid> 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
Giant C. (Guest)
on 2007-02-02 19:57
> 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?
Kent S. (Guest)
on 2007-02-02 20:00
(Received via mailing list)
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. <removed_email_address@domain.invalid> wrote:
>
>
--
Kent
---
http://www.datanoise.com
Giant C. (Guest)
on 2007-02-02 20:02
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.
Katya (Guest)
on 2007-04-17 17:15
(Received via mailing list)
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 ;-)

regards
Katya

On 2 Feb., 20:02, Giant C. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.