- 博客(9)
- 收藏
- 关注
原创 error_messages 替代
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| error_class = "fieldWithErrors" if html_tag =~ /<(label)/ %Q{ <div class="#{error_class}"> #{ht...
2009-10-30 14:43:43 103
原创 Rails Memcache undefined class/module issue solution
class << Marshal def load_with_autoload(*args) begin load_without_autoload(*args) rescue [ArgumentError, NameError] => ex msg = ex.message if msg =~ /undefin...
2009-10-30 14:39:49 126
原创 will_paginate ajax pagination
Ajax pagination This is the most popular feature request for will_paginate library. Reasons why the core library doesn’t support this are: pagination is a concept decoupled from HTTP requests a...
2009-09-25 13:20:09 111
原创 create table with ActiveRecord alone
You could use migrations. But thats just another way of describing the table. If you want another approach (defining a model and then letting the abstraction layer create the required database), you ...
2008-09-12 17:13:23 76
linux 下 mysql 编译
mysql安装 编译源代码并安装。 groupadd mysql useradd mysql cd mysql_src_home ./configure --prefix=/usr/local/mysql make make install scripts/mysql_install_db chown -R root:mysql /usr/local/mysql chown -R mysql...
2007-10-26 09:46:11 83
eval ,proc
On Behalf Of Damjan Rems: # a1=10 # r= ?('a' + '1') # ? is whatever, r should have value 10 <script type="text/javascript"></script> some simple ways, A. using eval >> a1=10 =&g...
2007-08-29 09:41:09 73
Understanding allocate
Understanding allocate In rare circumstances you might want to create an object without calling its constructor (bypassing initialize). For example, maybe you have an object whose state is determine...
2007-05-09 10:36:49 66
Including a Module with append_features
Including a Module with append_features module MyMod def MyMod.append_features(someClass) def someClass.modmeth puts "Module (class) method" end ...
2007-05-09 10:30:31 101
acts_as_ferret
为什么选择ferret的原因咱就不说了,废话少说 下载ferret.gem , acts_as_ferret plugin gem : gem insatall ferret plugin : svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret,直接check out下来放到vendor/plugin 目录...
2007-04-26 11:08:10 111
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人