- 博客(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
165
原创 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
193
原创 will_paginate ajax pagination
Ajax paginationThis 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
180
原创 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 abstractionlayer create the required database), you ...
2008-09-12 17:13:23
105
linux 下 mysql 编译
mysql安装 编译源代码并安装。groupadd mysqluseradd mysqlcd mysql_src_home./configure --prefix=/usr/local/mysqlmakemake installscripts/mysql_install_dbchown -R root:mysql /usr/local/mysqlchown -R mysql...
2007-10-26 09:46:11
105
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
102
Understanding allocate
Understanding allocateIn 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
85
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
163
acts_as_ferret
为什么选择ferret的原因咱就不说了,废话少说下载ferret.gem , acts_as_ferret plugingem : gem insatall ferretplugin : svn://projects.jkraemer.net/acts_as_ferret/trunk/plugin/acts_as_ferret,直接check out下来放到vendor/plugin 目录...
2007-04-26 11:08:10
190
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人