Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
[Standup][NYC] 2/29/2012 – Lead Day, do we have to program for that case?

Interesting

  • When using validates on an association, remember for uniqueness validations to use the associated attribute.

    validates :foo, :uniqueness => true
    

    Should be

    validates :foo_id, :uniqueness => true
    
  • You can get a quick an easy git blame with a string, rather than a line number.

    git log –pretty=oneline -S’some string’

Help

  • What is the advantage of using scope over a class method?

    scope :new, order(:id)
    

    or

    def self.new
      order(:id)
    end
    

    Some Pivots seem to think that scope doesn’t add the default scope in some cases (a bug?). It appears that class methods are the preferred way moving forward in Rails.

Events

  • Tuesday brown bag was a series of Youtube videos of Alan Key speaking about programming.
  • Thursday UX Book Club is meeting to discuss Steve Jobs book.

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *