dynamoid

https://github.com/veraticus/dynamoid

Ruby ORM for Amazon's DynamoDB

ApplicationHelper#time_ago_with_tooltip

Render a `time` element with Javascript-based relative date and tooltip

time       - Time object
placement  - Tooltip placement String (default: "top")
html_class - Custom class for `time` element (default: "time_ago")

By default also includes a `script` element with Javascript necessary to
initialize the `timeago` jQuery extension. If this method is called many
times, for example rendering hundreds of commits, it's advisable to disable
this behavior using the `skip_js` argument and re-initializing `timeago`
manually once all of the elements have been rendered.

A `js-timeago` class is always added to the element, even when a custom
`html_class` argument is provided.

Returns an HTML-safe String

Source | Google | Stack overflow

Edit

git clone [email protected]:veraticus/dynamoid.git

cd dynamoid

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ApplicationHelper-time_ago_with_tooltip-for-pr


# Commit to git

git add git commit -m "better docs for ApplicationHelper#time_ago_with_tooltip"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ApplicationHelper-time_ago_with_tooltip-for-pr

hub pull-request


# Celebrate!