Sha256: ccad3fa5d430ad7adf92777fdfaac2275ce94cbb34bf61700889d252d84d579d
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
# rails-livestamp [![Gem Version](https://badge.fury.io/rb/rails-livestamp.svg)](http://badge.fury.io/rb/rails-livestamp) The rails-livestamp is a simple, unobtrusive jQuery plugin that provides auto-updating timeago text to your timestamped HTML elements, which will update automatically as time goes by. ISO 8601 timestamps are also supported. ## Installation Add this line to your application's Gemfile: ```ruby gem 'rails-livestamp' ``` And then execute: $ bundle Or install it yourself as: $ gem install rails-livestamp To use rails-livestamp add this require statement to your application.js file: ```ruby //= require rails-livestamp ``` ## Usage No extra JavaScript required! Just use a <span> with the data-livestamp attribute set to the desired Unix timestamp (in seconds), like this: ```ruby You discovered rails-livestamp <span data-livestamp="#{Time.now.to_i}"></span>. ``` And you will see something like this: ```ruby You discovered rails-livestamp a minutes ago. ``` Wait half a minute - the livestamp will update automatically. ## More Documentation. See the [livestamp documentation](http://mattbradley.github.io/livestampjs/). ## License [MIT License](http://www.opensource.org/licenses/mit-license.php) Copyright (c) 2015, [Matt Bradley (Livestamp.js Developer)](https://github.com/mattbradley), [Bunlong VAN (rails-livestamp Developer)](https://github.com/Bunlong)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-livestamp-1.1.3 | README.md |