What is the difference between <%, <%=, <%# and -%> in ERB in Rails?
摘要:http://stackoverflow.com/questions/998979/difference-between-and-in-rails/25617607#25617607 http://stackoverflow.com/questions/7996695/what-is-the-dif
阅读全文
posted @
2016-02-26 23:45
c3tc3tc3t
阅读(270)
推荐(0)
yield self和instance_eval用法区别
摘要:class Foo def initialize(&block) instance_eval(&block) if block_given? end end class Foo def initialize yield self if block_given? end end x = Foo.new
阅读全文
posted @
2016-02-26 20:41
c3tc3tc3t
阅读(308)
推荐(0)
by which, in which, from which 语法区别
摘要:(1)Here is Beijing,where I grow up.where其实也是指代北京,不过where是在北京的意思,也就是 in Beijing(2)Here is Beijing,in which I grow up.其实which就是指代北京,也就是I grow up in whic
阅读全文
posted @
2016-02-12 17:31
c3tc3tc3t
阅读(6418)
推荐(1)
行为驱动开发学习心得(一)
摘要:最近在看《The Rspec Book》这本书,主要讲的就是行为驱动开发,先不说这种方式的优劣,通过我看了前2章,觉得这种开发方式目前解决了我以前遇到的问题 一 业务分析需求了解的情况 问题 1 口口相传 我以前做开发,需要和产品经理或者项目分析人员,反复交流 ,首先我先听产品经理和分析人员描述需求
阅读全文
posted @
2016-02-11 12:04
c3tc3tc3t
阅读(757)
推荐(0)
Rspec中describe和context不同
摘要:转自 http://lmws.net/describe-vs-context-in-rspec 学习rspec,不太理解describe和context。google了一下,找到这篇文章,感觉说的有些道理 1 在Rspec的世界里,我们经常看到人们使用descirbe代码块和context代码块 例
阅读全文
posted @
2016-02-10 16:55
c3tc3tc3t
阅读(1153)
推荐(0)
rubymine配置 rspec
摘要:If you go in Run > Edit Configurations... And select All Specs in <Your Project> you'll see Filename Mask: **/*_spec.rb This means when you tell RubyM
阅读全文
posted @
2016-02-10 16:19
c3tc3tc3t
阅读(474)
推荐(0)