Foo = Class.create();
Foo.prototype = {
initialize: function() {
var array = $A([1, 2, 3]);
array.each(function (i) {
this.hello();
}.bind(this));
},
hello: function() {
alert('hello');
}
};
Gareth Evans wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~--- |
- [Rails-spinoffs] Re: Enumerable.each and 'this' confuse zven
- [Rails-spinoffs] Re: Enumerable.each and 'this' conf... Colin Mollenhour
- [Rails-spinoffs] Re: Enumerable.each and 'this' ... Gareth Evans
