lib/protector/adapters/sequel/dataset.rb in protector-0.6.1 vs lib/protector/adapters/sequel/dataset.rb in protector-0.6.2
- old
+ new
@@ -28,9 +28,13 @@
include Protector::DSL::Base
alias_method_chain :each, :protector
end
+ def creatable?
+ model.new.restrict!(protector_subject).creatable?
+ end
+
# Gets {Protector::DSL::Meta::Box} of this dataset
def protector_meta(subject=protector_subject)
model.protector_meta.evaluate(subject)
end
\ No newline at end of file