- 博客(5)
- 收藏
- 关注
peepcode:01.rjs
peepcode 01.rjs的使用 (1)link_to_remote和link_to_function的区别 link_to_remote为向服务器发出请求,然后生成alert("hello") link_to_function 获得包含这个链接的页面时,就已经生产alert("hello"),不用去服务服务器,会快点. (2)调用...
2009-06-03 17:27:30
125
scallingrails: 提高页面的反应能力
提高页面的反应能力 1.如何提高提高页面的反应能力 a.提高服务器的性能 b.减少页面的下载时间 2.在firefox中通过Yslow插件可以知道哪些可以通过responsivess 3.优化方法 (1)减少http请求 如下把三个js合成一个可以减少请求次数(通过:cache=>"main") ...
2009-05-31 17:51:16
106
railscast:99 complex_partial
99_complex_partial 当前情况:show.rhtml和index.rhtml都会用到_article.rhtml模板.模板中有些在index是要显示而在show中 是不用显示的.在_article.rhtml中用current_page?函数来区分.这使_article中掺杂了逻辑代码. 解决方法: ...
2009-05-15 17:54:37
149
railscast:48.console_tricks 控制台技巧
48.console_tricks (1)让console退出后回滚数据库 ruby scirpt/console product --sandbox (2)让console的输出更加美观(结果换行输出) >>y : (3)补全 >>Acti (按tab键) ...
2009-05-14 10:24:51
108
rails find 函数
情况:想以参数的形式传入Model的find函数, 如args ={ :limit => 10 },执行Model.find(:all,args,:join=>"...")时,传入的参数没作用.(:join是固定的) 分析: 源码: [code="ruby"] def find(*args) options = args...
2009-05-14 10:04:15
156
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人