I'm relatively new to Coffeescript and am running into some issues that I think are to do with skinny arrow vs fat arrow / _this vs this vs $(this).
I have the following class and constructor:
class @scenarioEditPage
constructor: ->
@getParentAttributes()
and @getParentAttributes() is
getParentAttributes: ->
@properties = {}
$("#form_configurable").find('input[type=hidden]').each (index, element) =>
@properties[$(element).attr('id')] = element.val()
Essentially what I'm trying to do is loop through all hidden fields in a form and assign their value to a key/value pair in the properties hash that can be used later. Example: hidden input field with id=some_id and value=some_value becomes properties[some_id] = some_value.
Any help would be greatly appreciated. Thank you!