New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility between padrino 0.13.2 and activesupport 3.2.22 #2052

Closed
ricardoccpaiva opened this Issue Jun 20, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@ricardoccpaiva

ricardoccpaiva commented Jun 20, 2016

As described in https://github.com/ricardoccpaiva/padrino_sample readme a simple padrino API fails when invoking 'my string'.humanize when using padrino 0.13.2 and activesupport 3.2.22

# ricardo.paiva at ricardo.paiva-macbook in ~/Projects/ricardoccpaiva/padrino_sample on git:master ● [15:23:45]
→ padrino s
=> Padrino/0.13.2 has taken the stage development at http://127.0.0.1:3000
[2016-06-20 15:23:55] INFO  WEBrick 1.3.1
[2016-06-20 15:23:55] INFO  ruby 2.3.0 (2015-12-25) [x86_64-darwin15]
[2016-06-20 15:23:55] INFO  WEBrick::HTTPServer#start: pid=71839 port=3000

From: /Users/ricardo.paiva/Projects/ricardoccpaiva/padrino_sample/app/controllers/foo_controller.rb @ line 5 self.GET /foo/bar:

    1: PadrinoSample::App.controllers :foo do
    2:   get :index, :map => '/foo/bar' do
    3:     require 'pry'
    4:     binding.pry
 => 5:     'my custom response'.humanize
    6:   end
    7: end

[1] pry(#<PadrinoSample::App>)> s

From: /Users/ricardo.paiva/.rvm/gems/ruby-2.3.0/gems/padrino-support-0.13.2/lib/padrino-support/core_ext/string/inflections.rb @ line 103 String#humanize:

    102: def humanize(options = {})
 => 103:   ActiveSupport::Inflector.humanize(self, options)
    104: end

[1] pry("my custom response")> ActiveSupport::Inflector.humanize(self, options)
ArgumentError: wrong number of arguments (given 2, expected 1)
from /Users/ricardo.paiva/.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22/lib/active_support/inflector/methods.rb:94:in `humanize'
[2] pry("my custom response")>
@wikimatze

This comment has been minimized.

Show comment
Hide comment
@wikimatze

wikimatze Jun 29, 2016

Member

Hi @ricardoccpaiva thanks for reporting this. Have you looked into the humanize function. It seems like you have to use it with `humanize('my custom response') - I haven't test it so far.

Member

wikimatze commented Jun 29, 2016

Hi @ricardoccpaiva thanks for reporting this. Have you looked into the humanize function. It seems like you have to use it with `humanize('my custom response') - I haven't test it so far.

@ujifgc ujifgc closed this in ae8992b Jun 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment