diff options
| author | hukl <contact@smyck.org> | 2009-04-13 20:37:16 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-04-13 20:37:16 +0200 |
| commit | 06dee9ab33701e40a5adfcf87767fb807621fa32 (patch) | |
| tree | 73a7fc1307dcd2f9e41a42d575511bda1b5c0296 /app/controllers | |
| parent | 22aa8523ef5864d736faf6595ef258adc0689703 (diff) | |
beautified the revision and diff interface. so pretty and so functional. i'm happy
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/revisions_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/revisions_controller.rb b/app/controllers/revisions_controller.rb index 6914509..7ae22f8 100644 --- a/app/controllers/revisions_controller.rb +++ b/app/controllers/revisions_controller.rb | |||
| @@ -10,20 +10,20 @@ class RevisionsController < ApplicationController | |||
| 10 | 10 | ||
| 11 | puts @node.pages.length | 11 | puts @node.pages.length |
| 12 | if @node.pages.length > 1 | 12 | if @node.pages.length > 1 |
| 13 | params[:start] ||= @node.pages.all[-2].revision | 13 | params[:start_revision] ||= @node.pages.all[-2].revision |
| 14 | params[:end] ||= @node.pages.all[-1].revision | 14 | params[:end_revision] ||= @node.pages.all[-1].revision |
| 15 | else | 15 | else |
| 16 | params[:start], params[:end] = 1, 1 | 16 | params[:start], params[:end] = 1, 1 |
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | @start = Page.find( :first, :conditions => { | 19 | @start = Page.find( :first, :conditions => { |
| 20 | :node_id => params[:id], | 20 | :node_id => params[:id], |
| 21 | :revision => params[:start] | 21 | :revision => params[:start_revision] |
| 22 | }) | 22 | }) |
| 23 | 23 | ||
| 24 | @end = Page.find( :first, :conditions => { | 24 | @end = Page.find( :first, :conditions => { |
| 25 | :node_id => params[:id], | 25 | :node_id => params[:id], |
| 26 | :revision => params[:end] | 26 | :revision => params[:end_revision] |
| 27 | }) | 27 | }) |
| 28 | 28 | ||
| 29 | end | 29 | end |
