Merge branch 'master' of github.com:Retrospring/retrospring
This commit is contained in:
commit
141db2e521
|
@ -121,3 +121,7 @@ body {
|
||||||
top:64px;
|
top:64px;
|
||||||
right:10px
|
right:10px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
|
@ -48,4 +48,20 @@ class Ajax::QuestionController < ApplicationController
|
||||||
@message = "Question asked successfully."
|
@message = "Question asked successfully."
|
||||||
@success = true
|
@success = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def preview
|
||||||
|
params.require :md
|
||||||
|
|
||||||
|
@message = "Failed to render markdown."
|
||||||
|
begin
|
||||||
|
@markdown = markdown(params[:md], Time.new)
|
||||||
|
@message = "Successfully rendered markdown."
|
||||||
|
rescue
|
||||||
|
@status = :fail
|
||||||
|
@success = false
|
||||||
|
return
|
||||||
|
end
|
||||||
|
@status = :okay
|
||||||
|
@success = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
json.partial! 'ajax/shared/status'
|
||||||
|
json.markdown @markdown if @markdown
|
|
@ -1,4 +1,4 @@
|
||||||
.centre.text-muted
|
.centre.text-muted.links
|
||||||
©
|
©
|
||||||
= Date.today.year
|
= Date.today.year
|
||||||
= APP_CONFIG['site_name']
|
= APP_CONFIG['site_name']
|
||||||
|
|
|
@ -81,6 +81,7 @@ Rails.application.routes.draw do
|
||||||
match '/create_group', to: 'group#create', via: :post, as: :create_group
|
match '/create_group', to: 'group#create', via: :post, as: :create_group
|
||||||
match '/destroy_group', to: 'group#destroy', via: :post, as: :destroy_group
|
match '/destroy_group', to: 'group#destroy', via: :post, as: :destroy_group
|
||||||
match '/group_membership', to: 'group#membership', via: :post, as: :group_membership
|
match '/group_membership', to: 'group#membership', via: :post, as: :group_membership
|
||||||
|
match '/preview', to: "question#preview", via: :post, as: :preview
|
||||||
end
|
end
|
||||||
|
|
||||||
match '/public', to: 'public#index', via: :get, as: :public_timeline
|
match '/public', to: 'public#index', via: :get, as: :public_timeline
|
||||||
|
|
Loading…
Reference in New Issue