Permalink
Browse files

cleanup some old AS dependencies

  • Loading branch information...
ujifgc committed Oct 26, 2015
1 parent 39514ce commit 83462d3cf6961308dbb9dbb511b64f6d6aa189d0
@@ -1,11 +1,7 @@
require 'padrino-support'
require 'i18n'
require 'enumerator'
require 'active_support/time_with_zone' # next extension depends on this
require 'active_support/core_ext/string/conversions' # to_date
require 'active_support/option_merger' # with_options
require 'active_support/core_ext/object/with_options' # with_options
require 'active_support/inflector' # humanize
require 'active_support/core_ext/hash/except' # Hash#except
require 'padrino/rendering'
@@ -95,4 +95,18 @@ def camelize(first_letter = :upper)
def classify
ActiveSupport::Inflector.classify(self)
end
##
# Capitalizes the first word, turns underscores into spaces, and strips a trailing '_id' if present.
#
def humanize(options = {})
ActiveSupport::Inflector.humanize(self, options)
end
##
# Replaces underscores with dashes in the string.
#
def dasherize
ActiveSupport::Inflector.dasherize(self)
end
end

2 comments on commit 83462d3

@mohitnegi

This comment has been minimized.

Show comment
Hide comment
@mohitnegi

mohitnegi Jun 29, 2016

humanize method throws error {ArgumentError: wrong number of arguments (2 for 1)}.
ActiveSupport(3.2.19) expect single argument.

mohitnegi replied Jun 29, 2016

humanize method throws error {ArgumentError: wrong number of arguments (2 for 1)}.
ActiveSupport(3.2.19) expect single argument.

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jun 29, 2016

Member

Thanks.

Member

ujifgc replied Jun 29, 2016

Thanks.

Please sign in to comment.