Skip to content

Commit

Permalink
'admin' == params[:password] looks strange, swap order
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed May 2, 2011
1 parent 53ac868 commit 6ec0229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.rdoc
Expand Up @@ -1562,7 +1562,7 @@ application (Rails/Ramaze/Camping/...):
get('/login') { haml :login }

post('/login') do
if 'admin' == params[:name] && 'admin' == params[:password]
if params[:name] == 'admin' && params[:password] == 'admin'
session['user_name'] = params[:name]
else
redirect '/login'
Expand Down

1 comment on commit 6ec0229

@baldowl
Copy link
Contributor

@baldowl baldowl commented on 6ec0229 May 2, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly looks "alien", but I've been bitten more than once by using "=" instead of "==", so took the abit of putting constants before the "==" :-)

Please sign in to comment.