• Stars
    star
    114
  • Rank 300,924 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 11 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Garlic.js in love with Rails Asset Pipeline

garlicjs-rails

garlicjs-rails wraps the Garlic.js library in a rails engine for simple use with the asset pipeline provided by rails 3.1. The gem includes the development (non-minified) source for ease of exploration. The asset pipeline will minify in production.

Garlic.js allows you to automatically persist your forms' text field values locally, until the form is submitted. This way, your users don't lose any precious data if they accidentally close their tab or browser.

It strives to have a javascript agnostic interface for UI/UX developers that might want to use it. Just add some data-persist="garlic" in your form tags, and you're good to go!

Installation

Add this line to your application's Gemfile:

gem 'garlicjs-rails'

Usage

Add the following directive to your Javascript manifest file (application.js):

//= require garlic

Compatibility

Garlic.js relies on localStorage, which is only compatible with "modern" browsers: IE8+, Chrome 4+, FF 4+, Safari 4+, Opera 11+. To add support for IE6 and IE7, add the localstorageshim-rails gem to your Gemfile:

gem 'localstorageshim-rails'

And add the following line to your application layout (must be before garlicjs is loaded):

<%= localstorage_shim %>

Versioning

garlicjs-rails 1.3.0 == Garlic.js 1.3.0

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

xxhash

Ruby wrapper for xxHash
C
139
star
2

jose-vs-oss

I'm here to help @josevalim fight Gihub issues
CoffeeScript
105
star
3

cityhash

Ruby wrapper for google's cityhash.
C++
94
star
4

wtf_lang

An awesome language detector
Ruby
73
star
5

dota

Ruby wrapper for Dota 2 WebAPI
Ruby
32
star
6

omniauth-stackexchange

StackExchange OAuth strategy for OmniAuth
Ruby
21
star
7

github_cloner

With github_cloner you have an easy way to clone all your projects from github
Ruby
19
star
8

ruby_kick_prologs_ass

Ruby solutions of the Ninety-Nine Prolog Problems
Ruby
13
star
9

vlcrb

Ruby wrapper for libVLC
Ruby
8
star
10

rabin-karp

Rabin-Karp implementation in Ruby
Ruby
8
star
11

timezoner

A tiny service for detecting timezones by coordinates so you don't need to be dependent on online ones.
Ruby
7
star
12

zipf_distribution

Zipf's law in Ruby
Ruby
4
star
13

imstat

Check user status in the instant messengers
Ruby
3
star
14

zurek

A VERY simple polish notation calculator
3
star
15

crc16

CRC16 in DLX assembly
Assembly
3
star
16

qbLoader

An easy way to send files to http://file.qb.by
Shell
3
star
17

whoistoblame

Who is to blame?
Ruby
3
star
18

adventofcode

Elixir
2
star
19

hash_map

An implementation in Go of search and insertion operations for a hash table with linear probing
Go
2
star
20

stackoverflair

Put your stackoverflow flair on blog or wherever you want.
Ruby
2
star
21

sublime_config

my sublime text 2 config
Python
2
star
22

proteus_simulation

Assembly
2
star
23

rails_depot

depot project
Ruby
2
star
24

it_crowd

The IT Crowd characters in asm
Assembly
2
star
25

rubytest

rubytest
Ruby
2
star
26

windows_calc_loves_rails

windows <3 Rails
C++
2
star
27

validates_presence_of_boolean

Ruby
2
star
28

nashby.github.com

blog
JavaScript
2
star
29

quotypie

Your error message quote nonsense fixer.
Ruby
1
star
30

pay_fast_example

Simple app that uses ActiveMerchant PayFast integration
Ruby
1
star
31

goodoz

Goodreads.com rating for http://oz.by
CoffeeScript
1
star