Git Product home page Git Product logo

rails-ajax's Introduction

Rails-Ajax

Integrate Ajax capabilities to Rails websites with history, bookmarking, partial refreshes, Rails flashes, user callbacks, scripts execution, redirections.

Rails-Ajax is a Rails plugin that turns a static Rails website into an optimized one using Ajax, without altering the user experience and with minimal code changes.

Where is the documentation ?

Complete documentation can be found at rails-ajax.sourceforge.net

Basic install

rails-ajax is packaged as a Ruby gem. You can install it using RubyGems:

gem install rails-ajax

Basic usage

Generate configuration files

Once installed, some configuration files need to be generated:

rake rails-ajax:install

Edit configuration files

Edit the generated config files to your taste. Most importantly, identify the container that should be refreshed by Ajax calls, and set it in config/initializers/rails-ajax-config.rb:

main_container 'div#Content'

Include Javascript files

Include rails-ajax Javascript files in your asset pipeline (app/assets/javascripts/application.js):

// RailsAjax

//= require jquery.history

//= require jquery.rails-ajax

//= require RailsAjax-Config

It already works

Just restart your Rails server and your application should be working using Ajax calls to refresh just your main site container, with history, redirects, forms… working exactly the same way they did before.

For more advanced features, see the complete documentation.

Who contributed to it ?

Check the AUTHORS file.

What is the license ?

You can find out in the LICENSE file.

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.