Re: [Rails] Rails website start up time
On Sat, Oct 1, 2011 at 22:38, David Chua <zhchua@gmail.com> wrote:
> I thought that all erb code and its rails variables are all prepared before
> the actual erb file gets loaded and its not rendered on the fly?
That's the goal to strive for, but if it's all not rendered on the
fly, that means it's static, in which case why bother using ERb? :-)
Having Ruby code in your ERb files is a necessary evil. The trick is
to do as much as possible of the complicated logic in the other parts.
The things that respond at a very high level to the current "command"
(like "tell the model to make a new one" or "tell the model to tag
this post with this comment") are generally in the controller, while
the logic behind *that* (the actual creation or tagging) is usually in
the model.
-Dave
--
LOOKING FOR WORK, preferably Ruby on Rails, in NoVa/DC; see main web site.
Main Web Site: davearonson.com
Programming Blog: codosaur.us
Excellence Blog: dare2xl.com
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home