refactored javascripts

This commit is contained in:
albert
2011-03-10 12:58:09 -05:00
parent 4af5c5c38f
commit efa6856b4a
27 changed files with 385 additions and 359 deletions

View File

@@ -3,7 +3,7 @@ class TagAliasesController < ApplicationController
respond_to :html, :xml, :json
def new
@tag_alias = TagAlias.new
@tag_alias = TagAlias.new(params[:tag_alias])
respond_with(@tag_alias)
end

View File

@@ -2,6 +2,7 @@ class WikiPagesController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :except => [:index, :show]
before_filter :moderator_only, :only => [:destroy]
before_filter :normalize_search_params, :only => [:index]
def new
@wiki_page = WikiPage.new
@@ -53,4 +54,12 @@ class WikiPagesController < ApplicationController
@wiki_page.revert_to!(@version)
respond_with(@wiki_page)
end
private
def normalize_search_params
if params[:title]
params[:search] ||= {}
params[:search][:title_equals] = params.delete(:title)
end
end
end