RailsCasts Pro episodes are now free!

Learn more or hide this

Prem Pillai's Profile

GitHub User: premjg

Site: http://adepto.in

Comments by Prem Pillai

Avatar

Is there a plan to support mongoid?

Avatar

Thanks for another very useful episode.

A small refactoring tip: I think inside the jQuery function you can use $(this) to reference the object.

// application.js
$(function() {
  $("#book_author_tokens").tokenInput("/authors.json", {
    crossDomain: false,
    prePopulate: $(this).data("pre"),
    theme: "facebook"
  });
});