Account name:
Password
(OpenID?)
(Forgot it?)
Remember Me
You're viewing
rubyonrails
Create a Dreamwidth Account
Learn More
Interest
Region
Site and Account
FAQ
Email
Reload page in style:
site
light
Ruby on Rails
Recent Entries
Archive
Member Posts
Tags
Memories
Profile
KJAZZQFrPUpiPzBxzmM
Date:
2013-05-26 07:57 pm (UTC)
From:
(Anonymous)
只要將 Query 盡量善用 Rails 3 的 AREL 的架構去下, 就可以做到 lazy load. (就是 view 呼叫 each 之類的才會真的 query db).如此拉資料的邏輯還是在 Controller 裡. View 也可以一如往常再加 fragment cache. 如此就仍能保有一定的效率 (雖然還是在吃 cache 前產生了 AREL 的物件計算, 不過那應該影響非常小), 同時還能 keep the rule, 維持一致性的結構啦.
From:
Anonymous
OpenID
Identity URL:
Log in?
Dreamwidth account
Account name
Password
Log in?
If you don't have an account you can
create one now
.
Subject
HTML doesn't work in the subject.
Formatting type
Casual HTML
Markdown
Raw HTML
Rich Text Editor
Message
Profile
Ruby on Rails
The Official Rails Website
July
2010
S
M
T
W
T
F
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Most Popular Tags
blocks
-
1 use
symbols
-
1 use
tutorials:beginners
-
4 uses
variables
-
1 use
Style Credit
Style:
Basic
for
Transmogrified
by
Yvonne
Expand Cut Tags
No cut tags
KJAZZQFrPUpiPzBxzmM
Date: 2013-05-26 07:57 pm (UTC)