Hobo / hobo

The web app builder for Rails (moved from tablatom/hobo)
http://hobocentral.net
103 stars 39 forks source link

ArgumentError, wrong number of arguments (5 for 4) #178

Closed mycaravam closed 8 years ago

mycaravam commented 8 years ago

after a clean install and fixing sporckets to 2.1.1 this occurs when generating a new resource: ` end

  def find_templates(name, prefix, partial, details)
    tag_name = @controller.dryml_fallback_tag || name.dasherize + '-page'
    method_name = tag_name.to_s.gsub('-', '_')
    details[:virtual_path] = "#{prefix}/#{name}"`

any ideas?

haslinger commented 8 years ago

I can confirm this error. I believe the reason is a signature change of the find_templates method in Rails 4.2.5.1 (compared to 4.2.5). The error always happens in this line of Hobo, where find_templates is overwritten with the old signature.

It I change this line (not really knowing, what I'm doing...) to def find_templates(name, prefix, partial, details, whatever) my tests would pass again, but I believe that way I would kill the security fix.

tacid commented 8 years ago

I can be wrong, but as I can see we can ignore this option, so just fix declaration of find_templates is just enough

iox commented 8 years ago

I think @tacid 's solution is good enough, and maintains the security fix. Thanks!

haslinger commented 8 years ago

@tacid @iox Thanks for your work! I got all my app's instances running on 4.2.5 literally today morning, and I almost thought I could take next week off. Seems I've some work next week upgrading again :-)

iox commented 8 years ago

Updates are a never ending story :D.

By the way, I just fixed all the tests in the master branch with Rails 4.2.5.1, everything is green again.

haslinger commented 8 years ago

@iox it would be great, if you could bump up the Hobo version and push to Rubygems. Upgrade would be easier and fresh installs would work again.

iox commented 8 years ago

Of course, it's in my task list.