RubyFlow The Ruby and Rails community linklog

Use binding methods of prototype.js to keep your code DRY

There’re two awesome methods in prototype.js library those are often overlooked by newcomers - Function.bind() and Function.bindAsEventListener(). These methods are so great that their absense from another awsomeness called Ruby is just driving me crazy every time I stumble upon it. But let’s take a closer look at why these methods are so useful, and let me show you almost a real app usage example. Read on for the rest of the article.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in