`
helloqidi
  • 浏览: 11884 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
beast学习笔记——7,forums/index.html.erb——结束篇   1 (1)代码 <% content_for :right do %> ...... <% end %> (2)表示 已在上一节解释过了。   2 (1)代码  number_with_delimiter(current_site.topics.size) (2)表示  number_with_delimiter,view的辅助方法,用于格式化数字,例如: <%=number_with_delimiter(12345678)%> =& ...
beast学习笔记——6,application.html.erb   1/此模版的整体布局: <div id="header"></div> <div id="container">   <div id="content"></div>   <div id="right"></div> </div> <div id="footer"></div>   2 ...
  beast学习笔记——5,_head.html.erb 参考: http://ihower.tw/blog/archives/3949 http://guides.ruby.tw/rails3/i18n.html、 http://apidock.com/rails 1, (1)代码 <title> <%=h @current_site && current_site.name || I18n.t('txt.beast_title', :default => 'Altered Beast') %> <%= " - ...
beast学习笔记——4,enviroment.rb 参考: http://my.oschina.net/fireflyman/blog/4255 http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies   总:每当你启动一个进程(例如Webrick服务器)处理Rails请求的时候,第一件发生的事情就是加载config/enviroment.rb   1, (1)代码 # Be sure to restart your server when you modify ...
beast学习笔记——3,application_controller 参考 http://www.iteye.com/topic/78885、 http://blog.csdn.net/jlaky/archive/2008/11/26/3378635.aspx(及其重要的学习资源) http://2015.iteye.com/blog/604377(关于CSRF跨站请求伪造与protect_from_forgery) http://blog.ashchan.com/archive/2008/11/24/rails-i18n-activerecord-model-hum ...
beast学习笔记——2,forums_controller 参考 http://www.iteye.com/topic/78885、 http://hi.baidu.com/haifreeidea/blog/item/c1a830ef2a92ee212cf534f0.html/cmtid/fd826e81a913b9d99023d95c       1, (1)代码: before_filter :admin_required, :except => [:index, :show] (2)表示: 前置过滤器,对index,show方法除外 (3)其他: ...
(原稿)beast学习笔记——1,routs.rb 参考 http://www.iteye.com/topic/78885、http://hi.baidu.com/haifreeidea/blog/item/c1a830ef2a92ee212cf534f0.html/cmtid/fd826e81a913b9d99023d95c   1, (1)代码 map.root :controller => 'forums', :action => 'index' (2)表示 首页的转向 (3)其他 REST与非REST的routs不同 【1】REST通过rub ...
beast学习笔记——开篇       从这篇开始,我想记录下我学习开源REST项目Beast的经过。     我的源码是从https://github.com/courtenay/altered_beast下载的,Beast项目在Windwos下运行的步骤已在上篇文章中写明,此源码的最后编辑备注为“August 07, 2009,Rename some rhtml files”。     我的这些笔记会不断更新,毕竟随着学习内容的增多,某些认识会是错的。     期望我可以坚持学完beast,阿门!       学习Beast之前,建议先找一本《Web开发敏捷之道》学习一下,然后 ...
(原稿)在 Windows下安装开源REST项目altered_beast 一、安装ruby,rubygems,rails参考:http://www.rubyonrailscn.org/down/1,下载并安装Ruby 1.8.7。 (注:altered_beast需要rails 2.3.3,而rails 2.3.3又至少需要Ruby 1.8.7)   2,下载rubygems-1.3.7,进入下载目录后通过命令ruby setup.rb来安装。3,安装Rails。通过执行:gem install rails 2.3.3来安装4,rails项目测试:rails testcd testru ...
Global site tag (gtag.js) - Google Analytics