Skip to content

Commit

Permalink
Remove no longer supported Array methods to_param/show_name
Browse files Browse the repository at this point in the history
 * Hasn't been used in QuickTravel since 2007
   See QT commit:7e27b6a6 ("IT PRINTS")
 * Hasn't been used in QuickTravel since 2010
   See QT commit:b049d91b ("Fixes #1904")
  • Loading branch information
mnoack committed May 17, 2018
1 parent ebab172 commit 52ee04b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
### Added
- [TT-4020] Implemented Rubocop

### Removed
- Remove no longer supported Array methods #to_param/#show_name

### Changed
- stringify_values_recursively now just works on to_s for all objects

Expand Down
8 changes: 0 additions & 8 deletions lib/ruby_core_extensions/array.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
class Array
def to_param
self.collect { |element| element.respond_to?(:to_param) ? element.to_param : element }
end

def show_name
first.titleize
end

# Key should be unique, or latest element with that key will override previous ones.
def hash_by(key = nil, method = nil, &block)
self.inject({}) do |h, element|
Expand Down

0 comments on commit 52ee04b

Please sign in to comment.