move notes login to one controller

This commit is contained in:
Dmitriy Zaporozhets 2012-02-24 09:16:06 +02:00
parent 81092c0198
commit 215a01f63c
15 changed files with 55 additions and 46 deletions

View file

@ -95,18 +95,6 @@ class ApplicationController < ActionController::Base
redirect_to @project unless @project.repo_exists? && @project.has_commits?
end
def respond_with_notes
if params[:last_id] && params[:first_id]
@notes = @notes.where("id >= ?", params[:first_id])
elsif params[:last_id]
@notes = @notes.where("id > ?", params[:last_id])
elsif params[:first_id]
@notes = @notes.where("id < ?", params[:first_id])
else
nil
end
end
def no_cache_headers
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response.headers["Pragma"] = "no-cache"