![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Rails 5 Tutorial 4th
博客
firethought
这个作者很懒,什么都没留下…
展开
-
Ruby on Rails 5 Tutorial 4th P186 为 name 属性添加存在性验证(已解决)
代码清单 6.9:为 name 属性添加存在性验证 GREENapp/models/user.rbclass User < ApplicationRecordvalidates :name, presence: trueend代码清单 6.9 中的代码看起来可能有点儿神奇,其实 validates 就是个方法。加入括号后,可以写成:class User < Applicat...原创 2020-04-17 16:24:06 · 136 阅读 · 0 评论 -
Ruby on Rails 5 Tutorial 4th P166 `gem 'rails-controller-testing'`
rails testRun options: --seed 26799# Running:EError:SiteLayoutTest#test_layout_links:NoMethodError: assert_template has been extracted to a gem. To continue using it, add `gem 'rails-...原创 2020-04-17 09:06:45 · 143 阅读 · 0 评论