Assertion against nil arguments in Page constructor - one guy sent me a storage, containing a page with nil name
This commit is contained in:
parent
e48c348e7f
commit
f77cf37f8e
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ class Page
|
|||
attr_accessor :revisions
|
||||
|
||||
def initialize(web, name, content, created_at, author)
|
||||
raise 'nil web' if web.nil?
|
||||
raise 'nil name' if name.nil?
|
||||
@web, @name, @revisions = web, name, []
|
||||
revise(content, created_at, author)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue