Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (33 sloc) 1.107 kB
8e06f2d initial commit
Ryan Hall authored
1 <head>
2 <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
3 <script type="text/javascript" src="js/jquery.zclip.min.js"></script>
4
5 <script>
6 $(document).ready(function() {
7 $('#input').keyup(function() {
8 $('#output').val("ActiveRecord::Base.connection.execute(\"" +
9 $(this).val().replace(/\"/g, "'").replace(/^\s*|\s*$/g,"") +
10 "\")");
11 });
12 $('#output').focus(function() {
13 this.select();
14 });
15 $('#output').click(function() {
16 this.select();
17 });
18 /*$('#copy').zclip({
19 path:'js/ZeroClipboard.swf',
20 copy:function(){return $('#output').val();}
21 });*/
22 $('#clear').click(function() {
23 $('#input').val('');
24 $('#output').val('');
25 });
26 });
27 </script>
28 </head>
29 <body>
30 <textarea id='input' style="width:100%;" rows="15"></textarea>
31 <textarea id='output' style="width:100%;" rows="15"></textarea>
32 <!--<button type='button' id='copy'>Copy</button>-->
33 <button type='button' id='clear'>Clear</button>
34 </body>
Something went wrong with that request. Please try again.