-
-
Save prussiap/8527328 to your computer and use it in GitHub Desktop.
full trace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= stylesheet_link_tag "gollum_editor/gollum" | |
= javascript_include_tag "gollum_editor/gollum" | |
= simple_form_for(@page, url: update_wiki_path, html: {method: "put"} ) do |f| | |
= f.input :name | |
= f.input :format,input_html: {value: "mediawiki"} | |
= f.gollum_editor :content | |
= f.fields_for :commit do |commit_fields| | |
= commit_fields.input :name, input_html: {value: "default name"} | |
= commit_fields.input :email, input_html: {value: "default@default.com"} | |
= commit_fields.input :message, input_html: {value: "Simple update"} | |
= f.button :submit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"utf8"=>"✓", | |
"_method"=>"put", | |
"authenticity_token"=>"dFaGyrmVNd9CMx5D+qTTHlTdFOWN0m77TuYVueOrWto=", | |
"page"=>{"name"=>"alignment", | |
"format"=>"mediawiki", | |
"content"=>"I'm placing information here about the Sequencing Alignment project.\r\n\r\n= Sequencing Alignment =\r\n\r\n== Software We Are Testing == \r\n\r\n* [http://bio-bwa.sourceforge.net/ Burrows Wheeler] \r\n** [http://www.ncbi.nlm.nih.gov/pubmed/19451168 short read] BWA paper\r\n** [http://www.ncbi.nlm.nih.gov/pubmed/20080505 long read] BWA paper\r\n** [http://sourceforge.net/projects/bio-bwa/files/ files]\r\n* [http://bowtie-bio.sourceforge.net/index.shtml Bowtie]\r\n** [http://genomebiology.com/2009/10/3/R25 paper]\r\n** [http://sourceforge.net/projects/bowtie-bio/files/bowtie/1.0.0/ files]\r\n* [http://soap.genomics.org.cn/ SOAP]\r\n** [http://bioinformatics.oxfordjournals.org/content/25/15/1966.abstract paper]\r\n** [http://soap.genomics.org.cn/soapaligner.html SOAPv2 alignment files]\r\n\r\n== Papers ==\r\nbkakjhasdf", | |
"commit"=>{"name"=>"default name", | |
"email"=>"default@default.com", | |
"message"=>"Simple update"}}, | |
"commit"=>"Update Page", | |
"url"=>"biology/alignment"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
put "wiki/:url" => "wiki#update", :constraints => {:url => /.*/}, :as => :update_wiki | |
post "wiki/:url" => "wiki#create", :constraints => {:url => /.*/}, :as => :create_wiki | |
get "wiki/edit/:url" => "wiki#edit", :constraints => {:url => /.*/}, :as => :edit_wiki | |
get "wiki/:url" => "wiki#show", :constraints => {:url => /.*/}, :as => :show_wiki | |
root 'root#index' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update | |
page = Page.find(params[:url]) | |
p "page name is #{params[:page][:name]}" | |
p "page content is #{params[:page][:content]}" | |
p "page wiki params is #{wiki_params}" | |
if page && page.update_attributes(wiki_params) | |
flash[:success] = "Your #{params[:url]} was udpated!" | |
redirect_to show_wiki_path(params[:url]) | |
else | |
flash[:error] = "Could not update your wiki" | |
render 'edit' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment