rename snippets_path helper due to conflict
This commit is contained in:
parent
dccd53e1ce
commit
730ff2e50b
2 changed files with 5 additions and 5 deletions
|
@ -11,7 +11,7 @@ module SnippetsHelper
|
|||
# Return the path of a snippets index for a user or for a project
|
||||
#
|
||||
# @returns String, path to snippet index
|
||||
def snippets_path(subject = nil, opts = nil)
|
||||
def subject_snippets_path(subject = nil, opts = nil)
|
||||
if subject.is_a?(Project)
|
||||
namespace_project_snippets_path(subject.namespace, subject, opts)
|
||||
else # assume subject === User
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
.nav-links.snippet-scope-menu
|
||||
%li{ class: ("active" unless params[:scope]) }
|
||||
= link_to snippets_path(subject) do
|
||||
= link_to subject_snippets_path(subject) do
|
||||
All
|
||||
%span.badge
|
||||
- if include_private
|
||||
|
@ -13,19 +13,19 @@
|
|||
|
||||
- if include_private
|
||||
%li{ class: ("active" if params[:scope] == "are_private") }
|
||||
= link_to snippets_path(subject, scope: 'are_private') do
|
||||
= link_to subject_snippets_path(subject, scope: 'are_private') do
|
||||
Private
|
||||
%span.badge
|
||||
= subject.snippets.are_private.count
|
||||
|
||||
%li{ class: ("active" if params[:scope] == "are_internal") }
|
||||
= link_to snippets_path(subject, scope: 'are_internal') do
|
||||
= link_to subject_snippets_path(subject, scope: 'are_internal') do
|
||||
Internal
|
||||
%span.badge
|
||||
= subject.snippets.are_internal.count
|
||||
|
||||
%li{ class: ("active" if params[:scope] == "are_public") }
|
||||
= link_to snippets_path(subject, scope: 'are_public') do
|
||||
= link_to subject_snippets_path(subject, scope: 'are_public') do
|
||||
Public
|
||||
%span.badge
|
||||
= subject.snippets.are_public.count
|
||||
|
|
Loading…
Reference in a new issue