Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tkh_toolbox

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tkh_toolbox

  • 0.9.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

TkhToolbox

This gem is part of the tkh_cms gem suite. In here we put lots of smallish utilities which can be used by different gems across the suite.

Installation

For Rails 4.0.0 and above add this line to your application's Gemfile:

gem 'tkh_toolbox', '~> 0.9'

For prior versions of Rails, use this:

gem 'tkh_toolbox', '< 0.9'

And then execute:

$ bundle

Run the following command:

	$ rake tkh_toolbox:setup

Usage

There are general purpose locale files. Look for them in the config/locales folder.

A flash view partial can be called at app/views/shared/_flash_messages.html.erb

A human_date_and_time(datetime_object) application extension gives the following date outputs depending when they happened in relation to today. Examples:

  • when less than 15 seconds then "just now"
  • when less than 5 minutes then "a few minutes ago"
  • when today then "at 02:18 pm"
  • when yesterday then "yesterday at 02:03 pm"
  • when this week then "Wednesday at 11:48 am"
  • when this year then "Jul. 23 at 02:12 pm"
  • when last year and earlier then "Aug. 23, 2013"

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

FAQs

Package last updated on 23 Sep 2014

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc