0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Provides smart-time-ago jQuery plugin for your Rails 3 app
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 3.2.8
 Project Readme

timeago-rails

Use smart-time-ago with your Rails 3 app.

Installation

  1. Add gem 'timeago-rails' to your Gemfile.
  2. Run bundle install.
  3. Add //= require timeago to your Javascript manifest file, after //= require jquery.

Usage

    <%= content_tag :time, '', class: 'timeago', datetime: 2.days.ago.iso8601 %>
    <script>
      $('.timeago').timeago();
    </script>

Note that smart-time-ago parses ISO8601 timestamp.

See the Usage section on the smart-time-ago project.

TODO: Perhaps should add view helper for creating timeago element?

License

Released under the MIT License

smart-time-ago License

Credits

Thanks to Pragmatic.ly for developing such an awesome plugin.

Copyright (c) 2012 James Chen