Christopher> For example:
Christopher> create_table :users do |t|
Christopher> t.login :string
Christopher> t.password :string
Christopher> t.email :string
The syntax is:
t.column :login, :string
t.column :password, :string
t.column :email, :string
If the create_table now does some kind method missing handling, it's
new to me :-)
--
] He who is tired of Weird Al is tired of life! | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] m...@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
then sign the petition.
I make this mistake once in a while too: make sure the order is
t.database_type :column_name
so your migration looks like this instead:
create_table :users do |t|
t.string :login
t.string :password
t.string :email
t.timestamps
end
It's a little weird that ActiveRecord didn't throw an exception complaining about not being able to create a column with type 'login'. Maybe when using MySQL you do get that, and because most users are on MySQL, not enough people have complained/cared about the issue/written a patch.
See if you get the same silent fail on MySQL and if so, it sounds like a patch is in order.
> --
> You received this message because you are subscribed to the Ottawa Group of Ruby Enthusiasts [OGRE].
> To post to this group, send email to ogre...@googlegroups.com
> To unsubscribe from this group, send email to
> ogre-list+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ogre-list?hl=en
> script/generate Order string:name
Instead of
> script/generate Order name:string
--
Cody Fauser
http://shopify.com - e-commerce done right
http://www.codyfauser.com - blog
http://peepcode.com/products/activemerchant-pdf - ActiveMerchant PeepCode
http://www.oreilly.com/catalog/rjsrails - RJS Templates for Rails