No commit activity in last 3 years
No release in over 3 years
Makes your Active Record models behave like content on Snapchat.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 5.7
~> 10.0
~> 1.3

Runtime

~> 4
 Project Readme

acts_as_snapchat!!

Have you ever wanted Active Record to behave like Snapchat? It's finally here! When a record is more than ten seconds old, it won't appear in any of your queries.

Installation

Add this line to your application's Gemfile:

gem 'acts_as_snapchat'

Usage

To make any model act as snapchat, just include acts_as_snapchat in your class definition:

class User < ActiveRecord::Base
  acts_as_snapchat

  # ...
end

And then stuff will happen:

User.create!
User.count # => 1
sleep 10
User.count # => 0

If you're a Node.js developer, you may be more comfortable using the alias acts_as_mongodb. :trollface:

Contributing

  1. Fork it ( https://github.com/vanruby/acts_as_snapchat/fork )
  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 a new Pull Request