Joe Moore's blog
Standup 04/30/2007
Interesting Things
- MoniTwitter is live! Check out the coolest site-monitoring mash-up in the history of site-monitoring mash-ups!
- When you use
:dependent => :destroyto cascade deletes, make sure you test them well! This really saved our bacon during a major rafactoring.
Ask for Help
- "I always forget how to submit an HTML form with a link in Rails..." Here you go!
<%= link_to_function('Link Name', "$('form_id').submit()") %>
Total Stand-up Meeting Time: 20:00 minutes
Standup 04/23/2007
Interesting Things
Latest news from the "cool new stuff" front:
- Check out these very educational slides about Mongrel HTTP Handlers, which allow you to use Mongrel with ActiveRecord, but bypass ActionController and other aspects of Rails.
- Also check out Merb: Mongrel + Erb, a "little bitty lightweight ruby app server."
- Finally, Heckle, a mutation tester similar to Java's Jester.
Total Stand-up Meeting Time: 9:00 minutes
Standup 04/10/2007
Interesting Things
- Has Ruby 1.8.6 dropped some important methods from Enumerable? For example, we can't seem to find
each_slice, and there seems to be very little documentation for 1.8.6.
Total Stand-up Meeting Time: 10:00 minutes
Standup 04/03/2007
Interesting Things
- Mac folks: if you edit your environment.plist, you have to log out, then log back in for the changes to take effect.
- Rails FYI: if you have an RHTML and a RJS template with the same name, by default the RHTML template will be rendered unless the RJS is explicitly called. Example:
<code>
# Project structure
app/
views/
users/
account.rhtml # will be rendered by default
account.rjs
profile.rhtml # will be rendered by default
profile.rjs
</code>
Both "account" and "profile" have RHTML and RJS templates. The following code will dictate which is rendered.
<code>
class UsersController
def account
# account.rhtml will be rendered by default
end
def profile
# explicitly render the render the RJS template
render :template => "users/profile.rjs"
end
end
</code>
Total Stand-up Meeting Time: 14:00 minutes
Standup 04/02/2007
Interesting Things
- For eager-loading of ActiveRecord associations, use
find(:all, :include => [:an_association]) - Markaby: there seems to be an issue when using
selectfrom Rails View Helper methods inside Markaby: Markaby will turn it into aselect_tag.
Total Stand-up Meeting Time: 14:00 minutes







