原创 rails 細研base.rb(rails_generator)

lib/ruby/gems/1.8/gems/rails-1.2.3/lib/rails_generator/base.rbrequire File.

原创 RJS Reference

[size=xx-large][color=indigo]JavaScriptGenerator[/color][/size]摘自:《OReilly.

原创 render 頁面javascript調用

情景:在使用 rail 中的 自動完成功能 auto_complete_field時,假若返回的頁面中有 javascript腳本,那它將不會被返回。

原创 Single table inheritance:單表繼承

[align=center][size=x-large]Single table inheritance:單表繼承[/size][/align]轉於:

原创 mysql進行優化

mysql進行優化的地方,簡單總結幾點:在設計數據表的時候,儘可能使用最有效(最小的)數據類型,儘可能使用更小的整數類型,可能定義字段類型爲 NOT

原创 一個表單提交多條記錄的處理(Ruby on Rails)

使用的是一個一對多關聯,代碼如下:view: partial名稱:<input type="text" name="invoice[][name]"

原创 linux 終端下輸出顯示顏色color for xterm in ruby lang.

linux 下,在ROR的app中,看到的有顏色的sql語句,實現方法,當然是調用 linux 的系統顏色來作設置的,當用tail -f file 查

原创 WEB 設計頁面東東

Quick StartSome useful hints if you are new to Plone: * Access key + 4 f

原创 使用include中嵌Hash取出一個多層次的對象關聯數據

使用include中嵌Hash取出一個多層次的對象關聯數據.首先有如下關係:project issue : 一對多issue comment : 一

原创 MySql的字符串函數

MySql的字符串函數ASCII(str) 返回字符串str的最左面字符的ASCII代碼值。如果str是空字符串,返回0。如果str是NULL,返回NULL。 mysql> select ASCII('2');

原创 ruby 日期

difference = Time.now - time seconds = difference % 60 difference = (difference - seconds) / 60 minutes

原创 HowToRunBackgroundJobsInRails--ap4r

http://ap4r.rubyforge.org/wiki/wiki.pl?GettingStarted [list=1][*]1. Busi

原创 Extreme Programming Applied PlAYING TO WIN

第四章 說服有牴觸情緒的人 [size=x-small]無論是什麼原因使您做出決定,都永遠會有人說您錯了。也總會有困難讓您相信批評您的人是正確的。

原创 添加mod_rewrite.c模塊

/etc/apache2/httpd.conf加入LoadModule rewrite_module /usr/lib/apache2/modules

原创 多對多關聯數據存儲ROR

[size=medium]Sku MODEL :[/size]class Sku < ActiveRecord::Base has_and_belo