Joe Moore's blog



Standup 04/30/2007

edit Posted by Joe Moore on Monday April 30, 2007 at 04:40PM

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 => :destroy to 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

edit Posted by Joe Moore on Monday April 23, 2007 at 04:51PM

Interesting Things

Latest news from the "cool new stuff" front:

Total Stand-up Meeting Time: 9:00 minutes

Standup 04/10/2007

edit Posted by Joe Moore on Monday April 09, 2007 at 04:36PM

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

edit Posted by Joe Moore on Tuesday April 03, 2007 at 10:32PM

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

edit Posted by Joe Moore on Monday April 02, 2007 at 05:58AM

Interesting Things

  • For eager-loading of ActiveRecord associations, use find(:all, :include => [:an_association])
  • Markaby: there seems to be an issue when using select from Rails View Helper methods inside Markaby: Markaby will turn it into a select_tag.

Total Stand-up Meeting Time: 14:00 minutes