Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created November 28, 2008 20:24
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 ahoward/30081 to your computer and use it in GitHub Desktop.
Save ahoward/30081 to your computer and use it in GitHub Desktop.
################################################################################
def index
@documents = @current_company.documents.find(:all).sort_by{|document| document.updated_at}.reverse
ignore = [ %r/[.]xbrl([.]tgz)$/ ] #, %r/^qval[.]/
@documents.delete_if{|document| ignore.any?{|pattern| pattern.match(document.filename)}}
# @documents.delete_if{|document| document.private}
end
################################################################################
def show
@document = @current_company.documents.find(params[:id])
inline!
end
def present
@document = @current_company.documents.find(params[:id])
send( presenter_for(@document) || 'inline!' )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment