Sha256: 01787d36f382f39732a78ce5df8bfba32c37e90c6c3fef08d15edb3fc0e87eb6

Contents?: true

Size: 246 Bytes

Versions: 18

Compression:

Stored size: 246 Bytes

Contents

module ActiveSupportMethods
  def camelize
    sub(/^([a-z])/) {$1.upcase}.gsub(/_([a-z])/) do
      $1.upcase
    end
  end

  def blank?
    empty?
  end
end
String.send :include, ActiveSupportMethods unless String.new.respond_to?(:underscore)

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
couch_potato-0.6.0 lib/core_ext/string.rb
couch_potato-0.5.7 lib/core_ext/string.rb
couch_potato-rails2-0.5.10 lib/core_ext/string.rb
couch_potato-rails2-0.5.9 lib/core_ext/string.rb
couch_potato-rails2-0.5.8 lib/core_ext/string.rb
couch_potato-rails2-0.5.7 lib/core_ext/string.rb
couch_potato-rails2-0.5.6 lib/core_ext/string.rb
couch_potato-0.5.6 lib/core_ext/string.rb
couch_potato-0.5.5 lib/core_ext/string.rb
couch_potato-0.5.4 lib/core_ext/string.rb
couch_potato-0.5.3 lib/core_ext/string.rb
couch_potato-0.5.2 lib/core_ext/string.rb
couch_potato-0.5.1 lib/core_ext/string.rb
couch_potato-0.5.0 lib/core_ext/string.rb
davber_couch_potato-0.4.0 lib/core_ext/string.rb
couch_potato-0.4.0 lib/core_ext/string.rb
couch_potato-0.3.2 lib/core_ext/string.rb
couch_potato-0.3.1 lib/core_ext/string.rb