摘要:
1.lean guide:helper method query ,✅🍅🍅🍅🍅 2.完成2周作业,并回顾一下(25分钟)✅,🍅🍅 3.再做一遍前两周的 (选择)至少50分钟 4.回顾日记,写周总结。 5.看了guide:belongs_to ✅,🍅 Formbuilder form_f 阅读全文
摘要:
仿照Rails实战:购物网站 教材:5-6 step5:计算总价,做出在nav上显示购物车内product的数量。 遇到的❌: 1. 错误❌提示:Nomethod each 纠错:没有加点“.” ,见上粉色框 2. 在我_navbar.html.erb中的导航条上创建显示购买的产品数量的功能:<%= 阅读全文
摘要:
http://guides.rubyonrails.org/security.html#user-management 2.session笔记见13日的随笔。 http://www.cnblogs.com/chentianwei/p/8031913.html 3.Cross-site Request 阅读全文
摘要:
bootstrap Grid : The Bs grid system has four classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). The classes can be combined 阅读全文
摘要:
Declare a controller method as a helper. For example, helper_method :link_to def link_to(name, options) … end makes the link_to controller method avai 阅读全文
摘要:
build定义:collection.build(attributes = {}, …) 本例子中collection换成cart_items. 说明:这个method返回一个或多个new objects of the associated type.但关联的对象尚未保存。需要save. Creat 阅读全文
摘要:
Jdstor第一部分后台设计,4-4上传图片。 3.4 Using Partials--3.4.4 Passing Local Variables You can also pass local variables into partials, making them even more power 阅读全文
摘要:
Overview of helpers provided by Action View 6.1 AssetTagHelper:用于generate html语言 image_tag ,return an HTML image tag for the source, 可以是部分路径。例子见下。 阅读全文
摘要:
❌: 1. /Users/chentianwei/jdstore3/jdstore/config/routes.rb:6:in `block in <top (required)>': undefined local variable or method `admin' for #<ActionDi 阅读全文
摘要:
Active Record validation: new_record?()//用于验证刚新建,但没存入database中的数据 ,返回true或false persisted?() //和new_record/()正相反,从英文意看出,Returns true if the record is 阅读全文