Giter Club home page Giter Club logo

rails-3-jquery's Introduction

About

Rails template to setup a new Rails 3 app to use the new jQuery drivers instead of the default prototype ones. More information is available at: http://loganleger.com/rails-3-jquery.

How to Use - New Project

rails new <appname> -m <path/to/jquery.rb>

The template will ask you if you want to override :defaults and add :jquery or just do one or the other.

So, for example, if you make download this template in ~/Sites:
rails new <appname> -m ~/Sites/jquery.rb

Otherwise, you can run it directly from github like so:
rails new <appname> -m https://github.com/lleger/Rails-3-jQuery/raw/master/jquery.rb

This template also makes a new javascript expansion if requested, :jquery, for use in the javascript_include_tag. For example:
<% javascript_include_tag :jquery %>

How to Use - Existing Project

If you're converting a Rails 3 app to jQuery, you can use rake rails:template to execute the template inside your existing app.

rake rails:template LOCATION=https://github.com/lleger/Rails-3-jQuery/raw/master/jquery.rb

Process

This template works via this process:

  1. Remove old prototype js
  2. Download latest jQuery min and place into javascripts folder
  3. Download latest jQuery drivers and place into javascripts folder
  4. Create requested javascript expansions

License

You are free to make any and all modifications to the template and use it in whatever appropriate context you desire, as long as you keep the attributions in place.

Pull Requests

I'm sure there are a lot of ways this can be done better, so if you make changes please send me a pull request.

rails-3-jquery's People

Contributors

lleger avatar joshuamiller avatar kent avatar

Stargazers

Pauli Price avatar  avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.