app/models/web.rb in instiki-0.10.1 vs app/models/web.rb in instiki-0.10.2
- old
+ new
@@ -42,13 +42,15 @@
def count_pages() @count_pages || false end
def markup() @markup ||= :textile end
def max_upload_size() @max_upload_size || 100; end
def wiki() @wiki ||= WikiService.instance; end
- def add_page(page)
- @pages[page.name] = page
- end
-
+ def add_page(name, content, created_at, author)
+ page = Page.new(self, name)
+ page.revise(content, created_at, author)
+ @pages[page.name] = page
+ end
+
def address=(the_address)
if the_address != CGI.escape(the_address)
raise Instiki::ValidationError.new('Web name should contain only valid URI characters')
end
@address = the_address