Module: Integrity::Helpers::Resources

Included in:
Integrity::Helpers
Defined in:
lib/integrity/helpers/resources.rb

Instance Method Summary collapse

Instance Method Details

#current_commitObject



8
9
10
# File 'lib/integrity/helpers/resources.rb', line 8

def current_commit
  @commit ||= current_project.commits.first(:identifier => params[:commit]) or raise Sinatra::NotFound
end

#current_projectObject



4
5
6
# File 'lib/integrity/helpers/resources.rb', line 4

def current_project
  @project ||= Project.first(:permalink => params[:project]) or raise Sinatra::NotFound
end