No commit activity in last 3 years
No release in over 3 years
Adds functionality confirmable attributes to models.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 4.2.3
~> 1.9
~> 10.0
~> 3.3.0
~> 1.3.10
 Project Readme

ConfirmedAttributes

Confirmed attributes for ActiveRecord.

Adds functionality confirmable attributes to models.

Installation

Add this line to your application's Gemfile:

gem 'confirmed_attributes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install confirmed_attributes

Usage

Add confirmable_attribute method to your model:

class User < ActiveRecord::Base
  confirmable_attribute :email
end

And use it:

@user = User.create email: "your_mail"

@user.confirmable_attributes # => [:email]
User.confirmable_attributes # => [:email]
@user.confimed_attributes # => []
@user.confirmed_attribute? :email # => false

@user.confirm :email # => true
@user.confimed_attributes # => [#<ConfirmedAttributes::Control:0x007f2eacd2f730> name: "email", value: "your_mail"...]
@user.confirmed_attribute? :email # => true

@user.unconfirm :email # => true

Simple, yeah?

Contributing

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