spec/dummy/app/models/city.rb in dynamic_controller-0.0.1 vs spec/dummy/app/models/city.rb in dynamic_controller-0.0.2
- old
+ new
@@ -1,5 +1,6 @@
-class City < ActiveRecord::Base
- belongs_to :country
- attr_accessible :country_id, :name
- validates_presence_of :country_id, :name
-end
+class City < ActiveRecord::Base
+ belongs_to :country
+ has_many :streets, dependent: :destroy
+ attr_accessible :country_id, :name
+ validates_presence_of :country_id, :name
+end