Commit cd3eabd7 authored by Vinnie Okada's avatar Vinnie Okada

Use GET instead of POST for Markdown previews

parent 5700842b
...@@ -48,7 +48,7 @@ $(document).ready -> ...@@ -48,7 +48,7 @@ $(document).ready ->
preview.text "Nothing to preview." preview.text "Nothing to preview."
else else
preview.text "Loading..." preview.text "Loading..."
$.post($(this).data("url"), $.get($(this).data("url"),
md_text: mdText md_text: mdText
).success (previewData) -> ).success (previewData) ->
preview.html previewData preview.html previewData
......
...@@ -186,7 +186,7 @@ Gitlab::Application.routes.draw do ...@@ -186,7 +186,7 @@ Gitlab::Application.routes.draw do
post :unarchive post :unarchive
post :upload_image post :upload_image
post :toggle_star post :toggle_star
post :markdown_preview get :markdown_preview
get :autocomplete_sources get :autocomplete_sources
get :import get :import
put :retry_import put :retry_import
......
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
# project GET /:id(.:format) projects#show # project GET /:id(.:format) projects#show
# PUT /:id(.:format) projects#update # PUT /:id(.:format) projects#update
# DELETE /:id(.:format) projects#destroy # DELETE /:id(.:format) projects#destroy
# markdown_preview_project POST /:id/markdown_preview(.:format) projects#markdown_preview # markdown_preview_project GET /:id/markdown_preview(.:format) projects#markdown_preview
describe ProjectsController, "routing" do describe ProjectsController, "routing" do
it "to #create" do it "to #create" do
post("/projects").should route_to('projects#create') post("/projects").should route_to('projects#create')
...@@ -96,7 +96,7 @@ describe ProjectsController, "routing" do ...@@ -96,7 +96,7 @@ describe ProjectsController, "routing" do
end end
it 'to #markdown_preview' do it 'to #markdown_preview' do
post('/gitlab/gitlabhq/markdown_preview').should( get('/gitlab/gitlabhq/markdown_preview').should(
route_to('projects#markdown_preview', id: 'gitlab/gitlabhq') route_to('projects#markdown_preview', id: 'gitlab/gitlabhq')
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment