It appears that the action in the helper dynamically builds the action
in controller. But then the question is what is options doing there and
which method is calling which?
It appears that the action in the helper dynamically builds the action
in controller. But then the question is what is options doing there and
which method is calling which?
Thanks for any suggestions.
def wow array=[1]
array
end
wow
copy and paste this in IRB and you'll understand. "options={}" says that
if no variable is passed for 'options', make it an empty hash.
The rest of the code should make some more sense.
In languages that don’t have default values, you always have to pass in an argument. For example, if you defined it this way (or if Ruby didn’t support them…)
It appears that the action in the helper dynamically builds the action
in controller. But then the question is what is options doing there and
which method is calling which?
Thanks for any suggestions.
def wow array=[1]
array
end
wow
copy and paste this in IRB and you'll understand. "options={}" says that
if no variable is passed for 'options', make it an empty hash.
The rest of the code should make some more sense.
Yup. If you're having trouble with this, please review your basic Ruby
syntax.