From 4c398ab710b247b5304a0bb5aeff8fc0ca67b9e5 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 14 Mar 2014 02:31:28 +0400 Subject: [PATCH] #345: fixed presenters, etc --- app/helpers/markdown_helper.rb | 2 +- app/views/projects/git/base/_choose_fork.html.haml | 2 +- lib/plugins/rosa_presenter/base.rb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/helpers/markdown_helper.rb b/app/helpers/markdown_helper.rb index b7db2a51f..51fb67551 100644 --- a/app/helpers/markdown_helper.rb +++ b/app/helpers/markdown_helper.rb @@ -173,7 +173,7 @@ module MarkdownHelper url = project_pull_request_path(issue.project, issue.pull_request) else title = "#{Issue.model_name.human}: #{issue.title}" - url = project_issue_path(issue.project.owner, issue.project.name, issue.serial_id) + url = project_issue_path(issue.project, issue.serial_id) end link_to(identifier, url, html_options.merge(title: title, class: "gfm gfm-issue #{html_options[:class]}")) end diff --git a/app/views/projects/git/base/_choose_fork.html.haml b/app/views/projects/git/base/_choose_fork.html.haml index d6e2c48e3..6f36e07de 100644 --- a/app/views/projects/git/base/_choose_fork.html.haml +++ b/app/views/projects/git/base/_choose_fork.html.haml @@ -4,7 +4,7 @@ - if owner.own_projects.exists? name: name %p.center =t 'layout.projects.already_exists' - =link_to full_name, project_path(owner, name) + =link_to full_name, project_path(@project) - else = form_for @project, url: fork_project_path(@project), html: { class: :form, multipart: true, method: :post } do |f| = hidden_field_tag :group, owner.id if owner.class == Group diff --git a/lib/plugins/rosa_presenter/base.rb b/lib/plugins/rosa_presenter/base.rb index 78273b465..91994dfcb 100644 --- a/lib/plugins/rosa_presenter/base.rb +++ b/lib/plugins/rosa_presenter/base.rb @@ -1,9 +1,10 @@ # This code based on https://github.com/ihoka/viewtastic module RosaPresenter class Base - include ActionDispatch::Routing::UrlFor + # include ActionDispatch::Routing::UrlFor include ActionView::Helpers::UrlHelper include ActionView::Helpers::TextHelper + include ActionView::Helpers::OutputSafetyHelper include ActionView::Helpers::JavaScriptHelper include Rails.application.routes.url_helpers