olivernn/poirot — Issue #14: Accessing View Class Methods via poirot JS
Author: TylerLH
Created: 2011-12-06 22:38:43+00:00
State: open

Hopefully my last issue. Any help would be greatly appreciated.

I'm trying to access my helper methods in my optional view class. For example:

```ruby
# View Class
module Users
class UserListView < Poirot::View
def foo
"bar"
end
end
end
```
```js
// JS call (coffeescript)
users = poirot.userList()
```

When loading the template with data, anything I define inside the JS obviously makes it into the view except for {{ foo }}.