Created
November 2, 2008 13:37
-
-
Save michael/21696 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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