Skip to content

Instantly share code, notes, and snippets.

@michael
Created November 2, 2008 13:37
Show Gist options
  • Select an option

  • Save michael/21696 to your computer and use it in GitHub Desktop.

Select an option

Save michael/21696 to your computer and use it in GitHub Desktop.
# quotes visible to a user
def quotes(query_hsh)
return [] if division_id.nil? || facility_id.nil?
if authorized?('all_quotes')
Quote.all(query_hsh)
elsif authorized?('own_quotes')
Quote.all({:user_id => id}.merge(query_hsh))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment