
读书笔记
Open2ye
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
读 Agile Web Development with Rails Second Edition 读书笔记 (一)
1.针对 decimal 字段的 Migration p71[code]add_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0[/code]2.很开的字符串可以用 %{..} 这样的符号p 80 [code]%{This book..get you up....2007-07-19 09:17:30 · 190 阅读 · 0 评论 -
读 Agile Web Development with Rails Second Edition 读书笔记 (二)
1. button_to 在客户端生成表单 用于POST 提交 用法同 link_top 92[code]button_to "Add to Cart", :action => add_to_cart %>[/code]2. 把session存进数据库p 971) rake db:sessions:create2) rake db:migrate3) [code...2007-07-19 13:51:26 · 159 阅读 · 0 评论 -
读 Agile Web Development with Rails Second Edition 读书笔记 (三)
1.类级的变量 及 form.select 中 prompt 的作用 及 validates_inclusion_of 的用法p 137ruby 代码 form.select :pay_type, Order::PAYMENT_TYPES, :prompt => "select a payment method" class Order <...2007-07-30 12:10:23 · 164 阅读 · 0 评论 -
读 Agile Web Development with Rails Second Edition 读书笔记 (四)
单元测试中 product.errors.invalid? 的用法p 181# product.rbvalidates_presence_of :titledef test_invalid_with_empty+attributes product = Product.new assert !product.valid? assert product.errors.inval...2007-07-30 12:36:39 · 171 阅读 · 0 评论