Sha256: fe0ab2c07771e5a04b8ad48a6d896f9f25c1c1d4bb028a008e3d9a6513e0c4d6
Contents?: true
Size: 395 Bytes
Versions: 1
Compression:
Stored size: 395 Bytes
Contents
class <%= class_name %> < ActiveRecord::Base belongs_to :<%= first_singular_name %> belongs_to :<%= second_singular_name %> validates_presence_of :<%= first_id_column %>, :<%= second_singular_name %>_id validates_uniqueness_of :<%= first_singular_name %>_id, :scope => :<%= second_id_column %> validates_uniqueness_of :<%= second_id_column %>, :scope => :<%= first_id_column %> end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
has_many_through_generator-0.4.0 | templates/model_manytomany.rb |