TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'ugly_javascript', github: "Manbo-/ugly_javascript"
And then execute:
$ bundle
<%= ugly_javascript do %>
$(function(){
var neko = "nya";
console.log(neko);
});
<% end %>
= ugly_javascript do
:plain
$(function(){
var neko = "nya";
console.log(neko);
});
<script> // </script>
class ExamplesController < ApplicationController
ugly_javascript
def javascript
code = <<-EOF
$(function(){
var neko = "nya";
console.log(neko);
});
EOF
respond_to do |format|
format.js{ render inline: code }
end
end
end
$(function(){var n="nya";console.log(n)});
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request