Skip to content

Instantly share code, notes, and snippets.

@ahoward ahoward/gist:30081
Created Nov 28, 2008

Embed
What would you like to do?
################################################################################
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
You can’t perform that action at this time.