原创 symbol
A symbol looks like a variable symbolsname, but it’s prefixed with a colon. Examples of symbols include :action,:line_i
原创 用Ruby On Rails構建 Web2.0 網站
你會發現 ROR有多麼的神奇記住下面的幾個文件,用javascript_include_tag "prototype"來使用 prototype.js 用javascript_include_tag "effects" 來使用 effe
原创 Tips
The value returned by a Rubymethod is the value of the last expression evaluated, so we can get rid ofthe temporary var
原创 MVC
Rails is a Model-View-Controller framework. Rails accepts incomingrequests from a browser, decodes the request to find
原创 關於程序員註釋習慣的調查
關於程序員註釋習慣的調查小弟最近在做註釋相關的功課,最近要做一個調查,主要是調查大家使用eclipse等開發工具時的註釋習慣,像註釋風格,以及一些相關的東西,如使用eclipse tasks這些功能 的情況
原创 你寫註釋嗎?
據統計,每個程序開發人員的工作時間中,只有不到一半的時間是花在寫代碼上,其它的時間一部分是在閱讀別人或者自己以前寫的代碼,另一部分則是花在代碼的導航定位上。就拿使用eclipse的開發人員來說,你可能只有一
原创 rails web server deploy guide
web server:install ubuntu 64bit server editionthen:################################1.install necessary
原创 AjaxScaffold的一個小問題
ajax_scaffold_plugin.rb中 有這樣幾句: def #{prefix}table_setup update_params :default_scaffold_id
原创 migration的一個問題
migration 似乎有這樣的問題 def self.up add_column "post","title",:String print Post.find(:first).t
原创 片段緩存的問題
sweeper 可以指定當更新時失效 after_save這些 比如 post裏面如果記錄了查看次數 ,那如果我想讓只是訪問次數發生變化時不要使緩存失效 ,那應該怎麼做呢
原创 有沒有辦法指定 緩存路徑?
特別是有二級域名的情況如 xx.xxx.com 的頁面緩存 也會存在了 public/index.html
原创 關於後綴的問題
.htm .html這些後綴應該是對SEO有好處的,RAILS裏面怎麼才能方便的實現這點呢,我的感覺是要改很多東西url_for,link_to 這些,還要改routes.rb是不是太麻煩了
原创 升級rails小記
以前裝的是1.8.4 的ruby和1.1.6的rails 換了幾個apt源都沒有1.8.6的ruby包,只好下源碼自己編譯了 步驟如下 wget ftp://ftp.ruby-lang.org/pub/ru
原创 SQL問題
select distinct g.* from groups g inner join topics t on (t.group_id = g.id) order by t.created_at desc
原创 想做一個在訪問一個頁面的用戶可以直接聊天
就像http://woocall.sina.com.cn/ 這種,用RAILS做有什麼建議?