Interesting
When using
validateson an association, remember for uniqueness validations to use the associated attribute.validates :foo, :uniqueness => trueShould be
validates :foo_id, :uniqueness => trueYou can get a quick an easy
git blamewith a string, rather than a line number.git log –pretty=oneline -S’some string’
Help
What is the advantage of using
scopeover a class method?scope :new, order(:id)or
def self.new order(:id) endSome Pivots seem to think that
scopedoesn’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.