spec/rails_app/app/models/role.rb in dynamic-fields-for-1.2.0 vs spec/rails_app/app/models/role.rb in dynamic-fields-for-1.2.1

- old
+ new

@@ -1,5 +1,9 @@ class Role < ActiveRecord::Base belongs_to :user + has_many :permissions, inverse_of: :role + + accepts_nested_attributes_for :permissions, allow_destroy: true + validates :user, :role_name, presence: true end