diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb index eec74832d0..2dce155f13 100644 --- a/app/controllers/questions_controller.rb +++ b/app/controllers/questions_controller.rb @@ -48,13 +48,12 @@ def index_shadow # a form for new questions, at /questions/new def new - @node = Node.new - @revision = Revision.new # use another node body as a template node_id = params[:n].to_i if node_id && !params[:body] && Node.exists?(node_id) - node = Node.find(node_id) - params[:body] = node.body + @node = Node.find(node_id) + @revision = @node.revision.first + params[:body] = @node.body end if current_user.nil? redirect_to new_user_session_path(return_to: request.path) diff --git a/app/views/editor/question.html.erb b/app/views/editor/question.html.erb index 589939da49..73a3e4cde0 100644 --- a/app/views/editor/question.html.erb +++ b/app/views/editor/question.html.erb @@ -64,15 +64,14 @@ %>
By publishing, you agree to open source your work so that others may use it.