Skip to content

Commit abfe018

Browse files
committed
Fix code in registration field guide, again
1 parent 08066c7 commit abfe018

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/guides/registration_field.rdoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ create account hook:
2626
enable :login, :logout, :create_account
2727

2828
before_create_account do
29+
name = param("name")
30+
2931
# Validate the name field. This example checks that it is not empty,
3032
# but you may want to have application specific checks.
31-
if name = param("name").empty?
33+
if name.empty?
3234
throw_error_status(422, "name", "must be present")
3335
end
3436

0 commit comments

Comments
 (0)