Skip to content

Instantly share code, notes, and snippets.

@taelor
Created June 4, 2009 20:59
Show Gist options
  • Select an option

  • Save taelor/123843 to your computer and use it in GitHub Desktop.

Select an option

Save taelor/123843 to your computer and use it in GitHub Desktop.
class ActiveRecord::Base
named_scope :company, lambda { { :conditions => ['company_id = ?', UserSession.find.user.company_id ] } }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment