From 34a48d55cc9763fb65c50b80e545c99350ebc6ca Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 6 Sep 2012 17:17:56 -0400 Subject: [PATCH 1/2] Revert "Change @project instance variable to a local in views/help/markdown" This reverts commit 6471d8c6521ef7a88f3aa893cc11c1da8077bdc0. --- app/views/help/markdown.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/help/markdown.html.haml b/app/views/help/markdown.html.haml index 15ad4a5b..0644ede3 100644 --- a/app/views/help/markdown.html.haml +++ b/app/views/help/markdown.html.haml @@ -88,9 +88,9 @@ for commits -# this example will only be shown if the user has a project with at least one issue - - if project = current_user.projects.first - - if issue = project.issues.first - %p For example in your #{link_to project.name, project_path(project)} project something like + - if @project = current_user.projects.first + - if issue = @project.issues.first + %p For example in your #{link_to @project.name, project_path(@project)} project something like %pre= "This is related to ##{issue.id}. @#{current_user.name} is working on solving it." %p becomes = markdown "This is related to ##{issue.id}. @#{current_user.name} is working on solving it." From 8fdeb43c36767fc10a0298598fd7452fa609faee Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 6 Sep 2012 17:20:57 -0400 Subject: [PATCH 2/2] Fix Help/Markdown: Take 2 --- app/views/help/markdown.html.haml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/help/markdown.html.haml b/app/views/help/markdown.html.haml index 0644ede3..2086b08c 100644 --- a/app/views/help/markdown.html.haml +++ b/app/views/help/markdown.html.haml @@ -90,12 +90,11 @@ -# this example will only be shown if the user has a project with at least one issue - if @project = current_user.projects.first - if issue = @project.issues.first - %p For example in your #{link_to @project.name, project_path(@project)} project something like + %p For example in your #{link_to @project.name, project_path(@project)} project, writing: %pre= "This is related to ##{issue.id}. @#{current_user.name} is working on solving it." - %p becomes - = markdown "This is related to ##{issue.id}. @#{current_user.name} is working on solving it." - - + %p becomes: + %pre= gfm "This is related to ##{issue.id}. @#{current_user.name} is working on solving it." + - @project = nil # Prevent this from bubbling up to page title .span4.right .alert.alert-info