Skip to content

Commit 08066c7

Browse files
committed
Fix code in registration field guide
1 parent a677c08 commit 08066c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/guides/registration_field.rdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ create account hook:
2828
before_create_account do
2929
# Validate the name field. This example checks that it is not empty,
3030
# but you may want to have application specific checks.
31-
unless name = param("name").empty?
31+
if name = param("name").empty?
3232
throw_error_status(422, "name", "must be present")
3333
end
3434

@@ -54,7 +54,7 @@ You can then handle the new submitted field as follows:
5454

5555
before_create_account do
5656
# Validate the name field
57-
throw_error_status(422, "name", "must be present") unless param("name").empty?
57+
throw_error_status(422, "name", "must be present") if param("name").empty?
5858
end
5959

6060
after_create_account do

0 commit comments

Comments
 (0)