Checkout of Instiki Trunk 1/21/2007.
This commit is contained in:
commit
69b62b6f33
1138 changed files with 139586 additions and 0 deletions
15
lib/instiki_errors.rb
Normal file
15
lib/instiki_errors.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Model methods that want to rollback transactions gracefully
|
||||
# (i.e, returning the user back to the form from which the request was posted)
|
||||
# should raise Instiki::ValidationError.
|
||||
#
|
||||
# E.g. if a model object does
|
||||
# raise "Foo: '#{foo}' is not equal to Bar: '#{bar}'" if (foo != bar)
|
||||
#
|
||||
# then the operation is not committed; Rails returns the user to the page
|
||||
# where s/he was entering foo and bar, and the error message will be displayed
|
||||
# on the page
|
||||
|
||||
module Instiki
|
||||
class ValidationError < StandardError
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue