The implementation of :decimal is different with each database, so I'd avoid it if possible. You may use a type not in this list as long as it is supported by your database (for example, :polygon in MySQL), but this will not be database agnostic and should also be avoided.
In case someone wants to see how these datatypes get mapped into the database you are using.
You can grab easily at rails source code at github.
For example
Found at https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L148
And if some one wants postgreSQL here you go.
Here is the default mappings of types for database adapters:
You can also see ActiveRecord data types in sources. Each DBMS adapter contains its own mapping. For example, in MySQL case look at this file: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L148 or get it by this line of code for current DBMS adapter:
If you're talking about the types for migrations, e.g. string, integer, datetime, etc, then you want ActiveRecord::ConnectionAdapters::TableDefinition, the column method. (Rails 5 edit: see also connection.add_column.)
As of this update, the standard types are:
:primary_key
:string
:text
:integer
:bigint
:float
:decimal
:numeric
:datetime
:time
:date
:binary
:boolean
The implementation of
:decimal
is different with each database, so I'd avoid it if possible. You may use a type not in this list as long as it is supported by your database (for example,:polygon
in MySQL), but this will not be database agnostic and should also be avoided.