diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-12-08 10:34:51 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-12-08 10:34:51 -0200 |
commit | bf0af030b6365936d2ff529e443132d7a508bfc6 (patch) | |
tree | 32de5e8e22313ecaba23293b1fb6c2d08186a75a /app/models/snippet.rb | |
parent | 23c1c70bf0321941ab2b9572a5d0532ed9f58002 (diff) | |
parent | f5430e48b42227f1c1874ca27c6907f0f704be28 (diff) | |
download | gitlab-ce-bf0af030b6365936d2ff529e443132d7a508bfc6.tar.gz |
Merge branch 'master' into fix-admin-should-be-able-to-add-himself-to-group
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index b0831982aa7..f876be7a4c8 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -65,6 +65,10 @@ class Snippet < ActiveRecord::Base }x end + def self.link_reference_pattern + super("snippets", /(?<snippet>\d+)/) + end + def to_reference(from_project = nil) reference = "#{self.class.reference_prefix}#{id}" |