Refactor: Rename WikiController#page_index to #index

index is the action that should list a collection of records, which is
what #page_index does.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4290 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-10-25 16:16:46 +00:00
parent 0e951c0716
commit 4b045badcf
7 changed files with 31 additions and 16 deletions
+20 -5
View File
@@ -17,6 +17,20 @@
require 'diff'
# The WikiController follows the Rails REST controller pattern but with
# a few differences
#
# * index - shows a list of WikiPages grouped by page or date
# * new - not used
# * create - not used
# * show - will also show the form for creating a new wiki page
# * edit - used to edit an existing or new page
# * update - used to save a wiki page update to the database, including new pages
# * destroy - normal
#
# Other member and collection methods are also used
#
# TODO: still being worked on
class WikiController < ApplicationController
default_search_scope :wiki_pages
before_filter :find_wiki, :authorize
@@ -28,6 +42,11 @@ class WikiController < ApplicationController
include AttachmentsHelper
helper :watchers
# List of pages, sorted alphabetically and by parent (hierarchy)
def index
load_pages_grouped_by_date_without_content
end
# display a page (in editing mode if it doesn't exist)
def show
page_title = params[:page]
@@ -180,7 +199,7 @@ class WikiController < ApplicationController
end
end
@page.destroy
redirect_to :action => 'page_index', :project_id => @project
redirect_to :action => 'index', :project_id => @project
end
# Export wiki to a single html file
@@ -194,10 +213,6 @@ class WikiController < ApplicationController
end
end
def page_index
load_pages_grouped_by_date_without_content
end
def date_index
load_pages_grouped_by_date_without_content
end