"ruby" + " on rails" * rand(2)
up2u0609
这个作者很懒,什么都没留下…
展开
-
why we use abstract_class in active_record ?
in the sample below: class BookLib < ActiveRecord::Base self.abstract_class = true end since abstract_class is set to true, this model class shifts to be a fade one(no table will be create ...原创 2009-12-04 17:00:51 · 89 阅读 · 0 评论 -
more than Rails from Rails internal----0.index
Rails是一个成功的ruby社区集体作品,从最早的几个activexxxx或者actionxxxxx简单拼凑而成的简单框架到现在几十个优秀gem包的优势集成,每一个gem包都在自己所着眼的领域内发挥着恰当的作用,Rails本身已经成为了一个舞台,集中展示了世界上很多极具天分和能量的工程师的智慧和经验,体现了ruby社区源源不断的创造力和精益求精的革新精神……热情洋溢吐槽掠过10000字。 ...原创 2011-07-27 20:36:39 · 65 阅读 · 0 评论 -
[警报解除]gem升级警报:使用rails3.1的同学不要着急升级sprockets
[color=red]此警报已接触,请直接升级到rails3.1.0.rc5 和 sprockets.2.0.0.beta.13[/color] sprockets-2.0.0.beta.10以后版本的一个微小改动会让r3.1的assets pipeline无法找到assets资源。 sprockets目前的版本是2.0.0.beta.12,一个多月前发布的2....2011-07-26 23:25:51 · 97 阅读 · 0 评论 -
ruby-debugger, Thank you for saving my life
恶啊……从最初到最后的最爱…… 在需要调试的地方输入debugger来调试,项目运行到这里会自动停止,具体调试命令,如下 help : 帮助命令,显示debugger的基本命令 l[ist] : 显示当前断点附近的代码,多次使用会显示后面的代码 l[ist]=: 显示当前断点附近的代码 l[ist]- : 显示当前断点之前的代码 ...原创 2011-07-19 21:25:14 · 75 阅读 · 0 评论 -
rails 新人培训提纲
第一天:学习基本的rails做法,写一个博客作为例子。学习model,controller,helper,views, migration,router,asset pipeline的基本用法。建议课外了解validator和callback。 第二天: further in application.rb and initializers/ directory. furt...原创 2011-07-11 23:10:02 · 85 阅读 · 0 评论 -
assets pipeline...a little pain in ass till now
http://www.rubyinside.com/how-to-rails-3-1-coffeescript-howto-4695.html http://ihower.tw/rails3/assets.html https://moocode.com/posts/1-deploying-a-rails-3-1-application-to-production 添加一个问...原创 2011-06-23 18:39:59 · 184 阅读 · 0 评论 -
对R3.1里的mountable engine有点意见
我只是一个Rails的使用者,很多的事情了解得并不深,视角和深度都有限,发这个帖子除了提出自己的疑问,更主要是希望听听大家意见,分享大家的心得。 engine被加入rails core曾经是一件很令我开心的事情,尤其是当我需要把一些固定的独立的MVC逻辑写成gem或者plugin的时候,原先大量的hack工作都消弭于无形。但是现在,我个人是觉得现在这个engine有点过了。 ...原创 2011-06-21 21:24:58 · 112 阅读 · 0 评论 -
[ZT]The Totally Unofficial Ruby coding style guide
难得要ZT一下! The Guide # Formatting Use UTF-8 as the source file encoding. Use 2 space indent, no tabs. (Your editor/IDE should have a setting to help you with that) Use Unix-style line endings. ...原创 2011-09-15 22:46:17 · 149 阅读 · 0 评论 -
more than Rails from Rails internal----1.rdoc & term-ansicolor
抓紧续上吧。 这段时间忙了点别的事情,当爸爸了呵呵,顺便掏出时间在医院走廊里学了一下erlang和nitrogen , chicagoBoss,个人爱好吧呵呵。 这篇我会很快补完。 补完前说点题外话。程序员们,工程师们,码工们,真的,不管你是怎么看待自己和自己的工作的,请拿出尊重来对待自己在使用的语言和你的工作。实际上你的成败不一定取决于你所用的语言,但是你所用的语言的成败会取决于你。...原创 2011-09-15 20:20:41 · 78 阅读 · 0 评论 -
ubuntu9.10+rails2.3.5+postgresql8.4的靠谱配置
[code="java"] apt-get install postgresql postgresql-client postgresql-contrib libpq-dev gem install postgres [/code] [code="java"] sudo gedit /etc/postgresql/8.4/main/pg_hba.conf [/code] [cod...原创 2010-01-26 12:05:21 · 84 阅读 · 0 评论 -
在rails3真正到来之前,写一个小东西,yy一下在非ar类里调用validation
实际是在工作过程中假公济私的一个即兴滥涂。 在2.3.5里通过了,其他版本就不知道了。 [code="java"] module StubActiveRecord class Base def save return valid? end def save!;end def new_record?;false;end de...原创 2010-01-22 22:10:14 · 79 阅读 · 0 评论 -
what difference between Array and Set, why Set is applied to widely in source
will complete later原创 2009-12-04 17:18:51 · 82 阅读 · 0 评论 -
centos 部署记
这事吧,干一次麻烦一次,还是记下来吧。 1. 装git和curl [code="java"]sudo yum install git sudo yum install curl [/code] 2. 建立帐号 [code="java"]sudo su - groupadd rvm usermod -a -G rvm xxxx passwd xxxx [/code] 在/...原创 2011-11-14 11:45:00 · 89 阅读 · 0 评论