2009年9月5日 星期六

Create Model Through Text Field

Create Model Through Text Field

daemon_generator vs Starling and Workling

Custom Daemon
Starling and Workling

Custom Daemon 比較適合就是讓daemon 去檢查 之後做事情

Starling 比較適合 就是真的把動作丟到background 去做, 有working 在, 有message queue 也可以配memcache

Positive and Negative Lookahead, regexp

Lookahead and Lookbehind Zero-Width Assertions
The negative lookahead construct is the pair of round brackets, opening bracket followed by a question mark and an exclamation point

把 1234567 這樣的數字在印出加上逗號變成 1,234,567 這樣的格式

2009年9月4日 星期五

hacking_activerecord, include module , extend, class_eval

Hacking ActiveRecord
module,class_eval,extend

memo, include rails environment and some File Dir method




Putting it in ~/web/lib is correct, but did you also require it from an initializer?

1. Create an initializer in ~/web/config/initializers called patches.rb
2. In the file put require File.join(Rails.root, 'lib', 'active_record_ndbcluster.rb')
3. Restart your webserver/Rails console

It should then work

rails , lib, module


2009年9月3日 星期四

block in view, yield, capture

Blocks in View
Pretty Blocks in Rails Views