Skip to content

Instantly share code, notes, and snippets.

@mikew
Created April 6, 2010 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikew/357973 to your computer and use it in GitHub Desktop.
Save mikew/357973 to your computer and use it in GitHub Desktop.
class BooksController < ApplicationController
def index
@books = resources
end
private
def resources
administrator? ? Book.all : Book.published
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment