Retourner au contenu associé (journal : <Mode grognon ON> Marre de Rails ...)
Posté par totof2000 le 24 avril 2008 à 14:41. En réponse au journal <Mode grognon ON> Marre de Rails .... Évalué à 2.
There’s a new alternative format for declaring migrations in a slightly more efficient format. Before you’d write: create_table :people do |t| t.column, "account_id", :integer t.column, "first_name", :string, :null => false t.column, "last_name", :string, :null => false t.column, "description", :text t.column, "created_at", :datetime t.column, "updated_at", :datetime end Now you can write: create_table :people do |t| t.integer :account_id t.string :first_name, :last_name, :null => false t.text :description t.timestamps end
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Finalement, je ne vois que deux solutions à mes problèmes
Posté par totof2000 . En réponse au journal <Mode grognon ON> Marre de Rails .... Évalué à 2.
gem uninstall rails
[ ... ]
gem uninstall rake
[ ... ]
gem install rails --version 1.2.6
Updating metadata for 18 gems from http://gems.rubyforge.org
..................
complete
+
Successfully installed rake-0.8.1
Successfully installed activesupport-1.4.4
Successfully installed activerecord-1.15.6
Successfully installed actionpack-1.13.6
Successfully installed actionmailer-1.3.6
Successfully installed actionwebservice-1.2.6
Successfully installed rails-1.2.6
7 gems installed
Je crains encore des surprises avec Rake 0.8.1 (un coup du genre db:migrate par exemple).
Sinon je viens d'aller voir le lien, et le truc qui me plait vraiment dans rails 2.0 c'est ça :
There’s a new alternative format for declaring migrations in a slightly more efficient format. Before you’d write:
create_table :people do |t|
t.column, "account_id", :integer
t.column, "first_name", :string, :null => false
t.column, "last_name", :string, :null => false
t.column, "description", :text
t.column, "created_at", :datetime
t.column, "updated_at", :datetime
end
Now you can write:
create_table :people do |t|
t.integer :account_id
t.string :first_name, :last_name, :null => false
t.text :description
t.timestamps
end