validateson an association, remember for uniqueness validations to use the associated attribute.
validates :foo, :uniqueness => true
validates :foo_id, :uniqueness => true
You can get a quick an easy
git blamewith a string, rather than a line number.
git log –pretty=oneline -S’some string’
What is the advantage of using
scopeover a class method?
scope :new, order(:id)
def self.new order(:id) end
Some 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.
- 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.