Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

ppworks/kienaide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kienaide

Protect your record.

Installation

Add this line to your application's Gemfile:

gem 'kienaide'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kienaide

Usage

Add protected boolean column.

class AddProtectedToPost< ActiveRecord::Migration
  def change
    change_column :posts, :protected, :boolean, null: false, default: false
  end
end

Add 'kienaide' to your class.

class Post < ActiveRecord::Base
  kienaide
end
post.protected = true
post.save

post.destroy
post.destroyed? # false

Contributing

  1. Fork it ( https://github.com/[my-github-username]/kienaide/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

Releases

No releases published

Packages

No packages published

Languages