summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-02 16:59:00 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-03 09:19:27 +0100
commitb4a8bc8a6e2bf04ad06aab009675b2f59c02c1af (patch)
tree91f40937241c07edf3bd4f2cb56957e3a8786442
parent57430dc4da113b14989be61e30e161ae0686ff27 (diff)
downloadgitlab-ce-fix-inflector.tar.gz
Remove inflector rule that makes commits uncountablefix-inflector
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--config/initializers/inflections.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index 5d46ece1e1b..9e8b0131f8f 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -8,24 +8,3 @@
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
-
-# Mark "commits" as uncountable.
-#
-# Without this change, the routes
-#
-# resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/}
-# resources :commits, only: [:show], constraints: {id: /.+/}
-#
-# would generate identical route helper methods (`project_commit_path`), resulting
-# in one of them not getting a helper method at all.
-#
-# After this change, the helper methods are:
-#
-# project_commit_path(@project, @project.commit)
-# # => "/gitlabhq/commit/bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a
-#
-# project_commits_path(@project, 'stable/README.md')
-# # => "/gitlabhq/commits/stable/README.md"
-ActiveSupport::Inflector.inflections do |inflect|
- inflect.uncountable %w(commits)
-end