摘要: 相关资料:http://wiki.github.com/mislav/will_paginatehttp://gitrdoc.com/mislav/will_paginate/tree/master/http://www.diybl.com/course/1_web/javascript/jsjs/20090519/167408.html安装分页插件[代码]注意是mislav-will_pagin... 阅读全文
posted @ 2009-06-09 16:41 Hi,Dan 阅读(386) 评论(1) 推荐(0) 编辑
摘要: 创建controller并包含index这个action方法[代码]修改app\controllers\store_controller.rb[代码]在app\views\layouts\ 目录下创建布局模板store.html.erb[代码]修改app\views\store\index.html.erb[代码]创建add_to_cart.html.erb[代码]访问http://127.0.0... 阅读全文
posted @ 2009-05-15 11:57 Hi,Dan 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 增加字段、数据校验方法、自定义css 阅读全文
posted @ 2009-05-14 21:14 Hi,Dan 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 增加字段 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--ruby script/generate migration add_column_to_model column_name:column_ty... 阅读全文
posted @ 2009-05-14 13:10 Hi,Dan 阅读(447) 评论(0) 推荐(0) 编辑
摘要: Ruby on Rails常用内置方法 阅读全文
posted @ 2009-05-14 12:02 Hi,Dan 阅读(758) 评论(0) 推荐(0) 编辑
摘要: Ruby on Rails HTML表单语句 阅读全文
posted @ 2009-05-14 11:59 Hi,Dan 阅读(859) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cslog.cn/Content/ruby_on_rails_migrationdef self.up     # db schema更新到下一版本  create_table :table, :force = true do |t| #创建表格    t.column :name, :s... 阅读全文
posted @ 2009-05-14 11:57 Hi,Dan 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Ruby on Rails 的检验方法(Validation Helpers) 阅读全文
posted @ 2009-05-14 11:52 Hi,Dan 阅读(1074) 评论(0) 推荐(0) 编辑
摘要: 安装ruby,rails,2行代码创建最简单的应用 1.rake db:create 2.ruby script/generate scaffold product title:string description:text image_url:string 3.rake db:migrate 阅读全文
posted @ 2009-05-13 22:07 Hi,Dan 阅读(1236) 评论(4) 推荐(0) 编辑
摘要: [代码] 阅读全文
posted @ 2009-05-11 22:48 Hi,Dan 阅读(722) 评论(0) 推荐(0) 编辑