Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
cd3eabd7
Commit
cd3eabd7
authored
Oct 16, 2014
by
Vinnie Okada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GET instead of POST for Markdown previews
parent
5700842b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/assets/javascripts/markdown_area.js.coffee
app/assets/javascripts/markdown_area.js.coffee
+1
-1
config/routes.rb
config/routes.rb
+1
-1
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+2
-2
No files found.
app/assets/javascripts/markdown_area.js.coffee
View file @
cd3eabd7
...
...
@@ -48,7 +48,7 @@ $(document).ready ->
preview
.
text
"Nothing to preview."
else
preview
.
text
"Loading..."
$
.
pos
t
(
$
(
this
).
data
(
"url"
),
$
.
ge
t
(
$
(
this
).
data
(
"url"
),
md_text
:
mdText
).
success
(
previewData
)
->
preview
.
html
previewData
...
...
config/routes.rb
View file @
cd3eabd7
...
...
@@ -186,7 +186,7 @@ Gitlab::Application.routes.draw do
post
:unarchive
post
:upload_image
post
:toggle_star
pos
t
:markdown_preview
ge
t
:markdown_preview
get
:autocomplete_sources
get
:import
put
:retry_import
...
...
spec/routing/project_routing_spec.rb
View file @
cd3eabd7
...
...
@@ -61,7 +61,7 @@ end
# project GET /:id(.:format) projects#show
# PUT /:id(.:format) projects#update
# 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
it
"to #create"
do
post
(
"/projects"
).
should
route_to
(
'projects#create'
)
...
...
@@ -96,7 +96,7 @@ describe ProjectsController, "routing" do
end
it
'to #markdown_preview'
do
pos
t
(
'/gitlab/gitlabhq/markdown_preview'
).
should
(
ge
t
(
'/gitlab/gitlabhq/markdown_preview'
).
should
(
route_to
(
'projects#markdown_preview'
,
id:
'gitlab/gitlabhq'
)
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment