diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-05 23:25:27 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-05 23:25:27 +0400 |
commit | e7bcbb95c88a42fc31bc0ccbdf6a819780a612ec (patch) | |
tree | 3d29ffada6edbd662c692a1bc3adb63696511b84 /app/helpers/snippets_helper.rb | |
parent | 36e832cc280115673e96f3adf624b9737d40f7fd (diff) |
Restyle snippets
Diffstat (limited to 'app/helpers/snippets_helper.rb')
-rw-r--r-- | app/helpers/snippets_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/snippets_helper.rb b/app/helpers/snippets_helper.rb index 6a91d616722..b0abc2cae33 100644 --- a/app/helpers/snippets_helper.rb +++ b/app/helpers/snippets_helper.rb @@ -8,4 +8,12 @@ module SnippetsHelper ] options_for_select(options) end + + def reliable_snippet_path(snippet) + if snippet.project_id? + project_snippet_path(snippet.project, snippet) + else + snippet_path(snippet) + end + end end |