Created
May 8, 2018 15:24
-
-
Save Valindo/fd8eaac4328496e0ecc9d77a5d9c3671 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
def index | |
@purchase_orders = if current_user.admin? then PurchaseOrder.all else current_user.purchase_orders end | |
render_success @purchase_orders, {include: :purchase_entries} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment