Ruby on Rails
文章平均质量分 66
fsw0723
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
说说rspec测试的使用
近来开始学习ruby on rails,用rspec做unit test. An basic rspec testing requires the following steps: 1. add gem 'rspec-rails' to Gemfile and run 'bundle install' 2. run 'rails generate rspec:install' to in原创 2013-08-23 00:37:35 · 724 阅读 · 0 评论 -
Amazing ruby: block & yield
之前听Anand讲用了ruby以后就不想用java了,如今看来还真是。Ruby里面有好多神奇的function,先小记一下block&yield 简单来说,ruby允许把一整个statement以parameter的形式放在block中传递,目标method通过yield运行这些statement. 基本用法,Eg. def test puts "You are in th原创 2013-08-22 00:15:39 · 688 阅读 · 0 评论 -
Ruby on rails naming conventions
一直都很晕ruby on rails里面的命名,看到一篇总结记录下来。(http://itsignals.cascadia.com.au/?p=7) Model Naming Convention Table: orders Class: Order File: /app/models/order.rb Primary Key: id Foreign Key: customer转载 2013-08-20 23:26:23 · 648 阅读 · 0 评论
分享