spec/dummy/app/models/entity.rb in heimdallr-resource-1.0.3 vs spec/dummy/app/models/entity.rb in heimdallr-resource-1.2.0
- old
+ new
@@ -1,7 +1,9 @@
class Entity < ActiveRecord::Base
include Heimdallr::Model
+ has_many :things, :dependent => :destroy
+
restrict do |user, record|
if user.admin
scope :fetch
scope :delete
can [:view, :create, :update]
\ No newline at end of file