refactored javascripts
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user