Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Return jQuery from module to get it work like original jQuery module #296

Open
wants to merge 1 commit into from

3 participants

@hauleth

No description provided.

@neerajdotname
Collaborator

@hauleth Can you elaborate on the change as to how it is useful.

@hauleth

When using RequireJS now this code:

require(['jquery_ujs'], function($) {});

Will not work as expected, after merge will.

@JangoSteve
Collaborator

I don't really use RequireJS in any projects, so I only have passing familiarity with it. Can you explain how this would normally be used, or more specifically why we'd want to return the jQuery object instead of the rails object? I.e. why wouldn't we instead want return rails; at the end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/rails.js
View
2  src/rails.js
@@ -426,4 +426,6 @@
});
}
+ return $;
+
})( jQuery );
Something went wrong with that request. Please try again.