Socket
Book a DemoInstallSign in
Socket

rails-livestamp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rails-livestamp

1.1.3
bundlerRubygems
Version published
Maintainers
1
Created
Source

rails-livestamp Gem Version

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:

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:

//= require rails-livestamp

Usage

No extra JavaScript required! Just use a with the data-livestamp attribute set to the desired Unix timestamp (in seconds), like this:

You discovered rails-livestamp <span data-livestamp="#{Time.now.to_i}"></span>.

And you will see something like this:

You discovered rails-livestamp a minutes ago. 

Wait half a minute - the livestamp will update automatically.

More Documentation.

See the livestamp documentation.

License

MIT License

Copyright (c) 2015, Matt Bradley (Livestamp.js Developer), Bunlong VAN (rails-livestamp Developer)

FAQs

Package last updated on 01 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.