intridea/grape — Issue #128: "helpers" method throwing an error
Author: kapso
Created: 2012-01-29 23:52:02+00:00
State: open

I am trying to use Grape v0.1.5 with Rails v3.2.1 and I am getting this error -

```
/Users/kapil/.rvm/gems/ruby-1.9.2-p0/gems/grape-0.1.5/lib/grape/api.rb:127:in `helpers': wrong number of arguments (1 for 0) (ArgumentError)
from /Users/kapil/data/projects/cnum/www/lib/api/test.rb:6:in `'
from /Users/kapil/data/projects/cnum/www/lib/api/test.rb:1:in `'
from /Users/kapil/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:469:in `load'
```

My helper is in a separate module/file - ```/lib/api/helper.rb```

```
module Api::Helper

def say_hello(user)
"hey there #{user.name}"
end

end
```

API class is in - ```/lib/api/test.rb```

```
class Api::Test < Grape::API

prefix 'api'
version 'v1'

helpers Api::Helper

....

end
```

If I comment out the helper method call, application works fine.