Project

corus

0.0
No release in over 3 years
Low commit activity in last 3 years
Use this gem to define what is not nullable related to an ActiveRecord backed class
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.12
~> 0.9.2
~> 2.6.0
~> 1.3.3

Runtime

~> 2.3.12
 Project Readme

Corus

Use this gem to define what is not nullable related to an ActiveRecord backed class

Install

config.gem 'corus'

Usage

    class Foo < ActiveRecord::Base
        tartarus :bar
    end

    thing = Foo.create(:bar => :baz)
    thing.bar = nil
    thing.valid? #=> false

    thing.save! #=> #<ActiveRecord::RecordInvalid: Validation failed: Bar can't be changed from 'baz' to nil>

    thing.save #=> false

    thing.bar = "widget"
    thing.valid? #=> true

    things.save #=> true

License

See LICENSE for information.