Add PostCreator#create!.

This commit is contained in:
Guo Xiang Tan
2016-07-15 11:36:06 +08:00
parent 5f5e045271
commit 5fe4837e28
3 changed files with 35 additions and 4 deletions

View File

@ -1,6 +1,7 @@
# Helper functions for dealing with errors and objects that have
# child objects with errors
module HasErrors
attr_reader :errors
def errors
@errors ||= ActiveModel::Errors.new(self)