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.
82c59780911721f5cbe82d3111313519?d=identicon&s=25 Giant Cranes (giantcranes)
on 2007-02-02 18: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 Development with Rails v2 does not list decimal as a supported
parameter type. Is decimal supported? If not, how should this be solved?

Thanks,
GiantCranes
C4dc94c893471878a105761a9207f29b?d=identicon&s=25 Zack Chandler (Guest)
on 2007-02-02 18:15
(Received via mailing list)
On 2/2/07, Giant Cranes <rails-mailing-list@andreas-s.net> wrote:
>
> Agile Web Development 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 Chandler
http://depixelate.com
82c59780911721f5cbe82d3111313519?d=identicon&s=25 Giant Cranes (giantcranes)
on 2007-02-02 18: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
F48118fe74b0c7f6fd82a0ee422fa34e?d=identicon&s=25 snacktime (Guest)
on 2007-02-02 18:29
(Received via mailing list)
On 2/2/07, Giant Cranes <rails-mailing-list@andreas-s.net> 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
82c59780911721f5cbe82d3111313519?d=identicon&s=25 Giant Cranes (giantcranes)
on 2007-02-02 18: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?
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2007-02-02 19: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 Cranes <rails-mailing-list@andreas-s.net> wrote:
>
>
--
Kent
---
http://www.datanoise.com
82c59780911721f5cbe82d3111313519?d=identicon&s=25 Giant Cranes (giantcranes)
on 2007-02-02 19:02
Kent Sibilev 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.
F48515edee171271903f3bf774f73b55?d=identicon&s=25 Katya (Guest)
on 2007-04-17 15: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 Cranes <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.