class Foo < ActiveRecord::Base
belongs_to :bar, inverse_of: :foos
validates :some_attribute,
unmarked_for_destruction_uniqueness: {
parent: :bar
, children: :foos
# , message: "Some message"
}
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rack', github: 'rack/rack' | |
gem 'rails', github: 'rails/rails' | |
gem 'sqlite3' | |
GEMFILE | |
system 'bundle' | |
end |
I hereby claim:
- I am cmbankester on github.
- I am cmbankester (https://keybase.io/cmbankester) on keybase.
- I have a public key ASCyTmwo_SDYj2aJwZ4mrlYFnknPoxzR4gkAndEh77DMqQo
To claim this, I am signing this object:
OlderNewer