public
Description: MooTools On Rails is a plugin for Ruby On Rails. It aims to replace the default Javascript Librairies : Prototype and Script.aculo.us by MooTools (another great javascript library).
Homepage: http://www.mootoolsonrails.com/
Clone URL: git://github.com/pointcom/mootools-on-rails.git
100755 52 lines (29 sloc) 0.984 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
= Mootools On Rails
 
 
== How to install
 
Just follow these three steps :
 
1. You must run the following task :
rake mootools_on_rails:install
 
2. You must add the following line in your layout :
<%= javascript_include_tag :mootools %>
 
3. You must add the following line in your RAILS_ROOT/config/routes.rb
ActionController::Routing::Routes.draw do |map|
...
MootoolsOnRails.routes
...
end
 
That's all !
 
 
== How to use
 
=== Event behaviour
 
In your view :
 
  <% add_event('link', 'click') do |page|
   page.alert('coucou div 2')
   end %>
  
  <%= content_tag(:a, "My Link", :id => 'link') %>
  
 
 
== More documentations
 
http://dev.kawooa.org/projects/mootools-on-rails/wiki/Mootools+On+Rails
 
== Contributors
 
Thank you to them :
 
- Grzegorz Kazulak
 
 
== Credits
 
* This plugin is inspired by the "YUI On Rails" plugin by "PJ Hyett".
* The unobtrusive_javascript plugin is by Luke Redpath (http://www.lukeredpath.co.uk) and Dan Webb (http://www.vivabit.com/bollocks).